fix modules xml cache creation

This commit is contained in:
Rodney Figaro 2017-02-08 10:56:57 +01:00
parent 08ae7ce78d
commit d40c3f056c

View File

@ -2106,6 +2106,18 @@ class AdminControllerCore extends Controller
return;
}
if (!file_exists(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
}
if (!file_exists(Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST, Tools::addonsRequest('native_all'));
}
if (!file_exists(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));
}
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
}