Skip to content

Commit 6180004

Browse files
committed
Add new packages status config
1 parent 1a5af58 commit 6180004

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/lib/classes/aps_crawler.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)