File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -568,6 +568,9 @@ public function parseFolderToDB()
568568 //$pkg_url = $this->app_download_url_list[$pkg];
569569 $ pkg_url = @file_get_contents ($ this ->interface_pkg_dir .'/ ' .$ pkg .'/PKG_URL ' );
570570
571+ //* Get global sites config
572+ $ sites_config = $ app ->getconf ->get_global_config ('sites ' );
573+
571574 // Insert only if data is complete
572575 if ($ pkg != '' && $ pkg_name != '' && $ pkg_category != '' && $ pkg_version != '' && $ pkg_release != '' && $ pkg_url ){
573576 $ insert_data = array (
@@ -577,7 +580,7 @@ public function parseFolderToDB()
577580 "version " => $ pkg_version ,
578581 "release " => $ pkg_release ,
579582 "package_url " => $ pkg_url ,
580- "package_status " => PACKAGE_ENABLED
583+ "package_status " => $ sites_config [ ' asp_new_package_disabled ' ] == ' y ' ? PACKAGE_LOCKED : PACKAGE_ENABLED
581584 );
582585 $ app ->db ->datalogInsert ('aps_packages ' , $ insert_data , 'id ' );
583586 } else {
You can’t perform that action at this time.
0 commit comments