fix check update issue on manage module page

This commit is contained in:
Shreesh Arora
2023-02-07 12:43:16 +05:30
parent c0ee4685ec
commit 940f73cc2d
2 changed files with 50 additions and 25 deletions

View File

@@ -206,16 +206,6 @@ class AdminModulesControllerCore extends AdminController
} else {
$this->status = 'cache';
}
if (!Tools::isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'))) {
$this->status = 'refresh';
} else {
$this->status = 'error';
}
} else {
$this->status = 'cache';
}
}
// If logged to Addons Webservices, refresh customer modules list every 5 minutes
@@ -736,7 +726,10 @@ class AdminModulesControllerCore extends AdminController
return;
}
if ($key == 'checkAndUpdate') {
if ($key == 'check') {
$this->ajaxProcessRefreshModuleList(true);
} elseif ($key == 'checkAndUpdate') {
$this->ajaxProcessRefreshModuleList(true);
$modules = array();
$modules_on_disk = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee, true);