From e7cdd5979fd1e070b3febb99350223a0b515f9de Mon Sep 17 00:00:00 2001 From: fSerny Date: Thu, 16 Feb 2012 10:10:34 +0000 Subject: [PATCH] [-] BO : AdminModules refresh native modules xml list if it's empty git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13382 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminModulesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 96270f1b1..4c1decf3b 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -143,7 +143,11 @@ class AdminModulesControllerCore extends AdminController public function isFresh($file, $timeout = 604800000) { if (file_exists(_PS_ROOT_DIR_.$file)) + { + if (filesize(_PS_ROOT_DIR_.$file) < 1) + return false; return ((time() - filemtime(_PS_ROOT_DIR_.$file)) < $timeout); + } else return false; }