[-] BO : retrocompatibility with adminModuleController 1.4 => 1.5. Some modules use $_GET['tab'],
on 1.5, those modules don't work because $_GET['tab'] doesn't exist. Now they work in the 1.5 even when they use $_GET['tab'] git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11773 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -526,7 +526,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check potential error
|
||||
if (!($module = Module::getInstanceByName(urldecode($name))))
|
||||
$this->_errors[] = $this->l('module not found');
|
||||
@@ -545,6 +544,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
// If we install a module, force temporary global context for multishop
|
||||
if (Shop::isFeatureActive() && Context::shop() != Shop::CONTEXT_ALL)
|
||||
{
|
||||
|
||||
// If we install a module, force temporary global context for multishop
|
||||
if (Shop::isFeatureActive() && Context::shop() != Shop::CONTEXT_ALL && $method != 'getContent')
|
||||
{
|
||||
@@ -554,6 +554,10 @@ class AdminModulesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
//retrocompatibility
|
||||
if (Tools::getValue('controller') != '')
|
||||
$_POST['tab'] = Tools::safeOutput(Tools::getValue('controller'));
|
||||
|
||||
if (((method_exists($module, $method) && ($echo = $module->{$method}()))) AND $key == 'configure' AND Module::isInstalled($module->name))
|
||||
{
|
||||
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
|
||||
@@ -593,7 +597,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
Context::getContext()->shop = clone(Context::getContext()->tmpOldShop);
|
||||
unset(Context::getContext()->tmpOldShop);
|
||||
}
|
||||
|
||||
// Display module configuration
|
||||
$this->context->smarty->assign('module_content', $toolbar.'<div class="clear"> </div>'.$echo.'<div class="clear"> </div>'.$toolbar);
|
||||
}
|
||||
@@ -601,7 +604,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
$return = ($method == 'install' ? 12 : 13);
|
||||
elseif ($echo === false)
|
||||
$module_errors[] = array('name' => $name, 'message' => $module->getErrors());
|
||||
|
||||
if (Shop::isFeatureActive() && Context::shop() != Shop::CONTEXT_ALL && isset(Context::getContext()->tmpOldShop))
|
||||
{
|
||||
Context::getContext()->shop = clone(Context::getContext()->tmpOldShop);
|
||||
@@ -926,7 +928,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
|
||||
if ($this->logged_on_addons)
|
||||
$tpl_vars['logged_on_addons'] = 1;
|
||||
|
||||
$smarty->assign($tpl_vars);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user