This commit is contained in:
vAugagneur
2012-08-01 15:36:11 +00:00
parent 6cfefac059
commit f96f5eaef6
6 changed files with 23 additions and 19 deletions

View File

@@ -167,11 +167,11 @@ class AdminModulesControllerCore extends AdminController
$protocolsList = array('https://' => 443, 'http://' => 80);
$postData = 'version='._PS_VERSION_.'&method=listing&action=native&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
}
if ($request == 'top_ranking')
if ($request == 'must-have')
{
// Define protocol accepted and post data values for this request
$protocolsList = array('https://' => 443, 'http://' => 80);
$postData = 'version='._PS_VERSION_.'&method=listing&action=top_ranking&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
$postData = 'version='._PS_VERSION_.'&method=listing&action=must-have&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
}
if ($request == 'customer')
{
@@ -253,9 +253,9 @@ class AdminModulesControllerCore extends AdminController
else
$this->status = 'cache';
if (!$this->isFresh(Module::CACHE_FILE_TOP_RANKING_MODULES_LIST, 86400))
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400))
{
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_TOP_RANKING_MODULES_LIST, $this->addonsRequest('top_ranking')))
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, $this->addonsRequest('must-have')))
$this->status = 'refresh';
else
$this->status = 'error';
@@ -986,6 +986,8 @@ class AdminModulesControllerCore extends AdminController
return true;
else if ($show_type_modules == 'addonsModules' && (!isset($module->type) || $module->type != 'addonsBought'))
return true;
else if ($show_type_modules == 'mustHaveModules' && (!isset($module->type) || $module->type != 'addonsMustHave'))
return true;
else if ($show_type_modules == 'otherModules' && (in_array($module->name, $this->list_partners_modules) || in_array($module->name, $this->list_natives_modules)))
return true;
else if (strpos($show_type_modules, 'authorModules[') !== false)