[-] BO : Modules list automatic refresh when BO connect to Addons - Bug fixed #PSTEST-367
This commit is contained in:
@@ -170,9 +170,11 @@
|
|||||||
controller : "AdminModules",
|
controller : "AdminModules",
|
||||||
action : "refreshModuleList"
|
action : "refreshModuleList"
|
||||||
},
|
},
|
||||||
success : function(res,textStatus,jqXHR)
|
success : function(data)
|
||||||
{
|
{
|
||||||
// res.status = cache or refresh
|
// res.status = cache or refresh
|
||||||
|
if (data == '{"status":"refresh"}')
|
||||||
|
window.location.href = window.location.href;
|
||||||
},
|
},
|
||||||
error: function(res,textStatus,jqXHR)
|
error: function(res,textStatus,jqXHR)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
public function isFresh($file, $timeout = 604800000)
|
public function isFresh($file, $timeout = 604800000)
|
||||||
{
|
{
|
||||||
if (file_exists(_PS_ROOT_DIR_.$file))
|
if (file_exists(_PS_ROOT_DIR_.$file))
|
||||||
return ((time() - filemtime(_PS_ROOT_DIR_.$this->cache_file_modules_list)) < $timeout);
|
return ((time() - filemtime(_PS_ROOT_DIR_.$file)) < $timeout);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user