From d40c3f056c6e34e4464e9d1c7ad67f726e072e4a Mon Sep 17 00:00:00 2001 From: Rodney Figaro Date: Wed, 8 Feb 2017 10:56:57 +0100 Subject: [PATCH] fix modules xml cache creation --- classes/controller/AdminController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 19bb2fa..96237e4 100755 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -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')); }