// clean code

This commit is contained in:
sThiebaut
2011-12-30 10:33:02 +00:00
parent 5db294b7ed
commit a0b35cfda5

View File

@@ -558,12 +558,15 @@ class AdminModulesControllerCore extends AdminController
if (Tools::getValue('controller') != '')
$_POST['tab'] = Tools::safeOutput(Tools::getValue('controller'));
// We check if method of module exists
if (!method_exists($module, $method))
throw new PrestashopException('Method can\'t be found');
throw new PrestashopException('Method of module can\'t be found');
// Get the return value of current method
$echo = $module->{$method}();
if ($key == 'configure' AND Module::isInstalled($module->name))
// If the method called is "configure" (getContent method), we show the html code of configure page
if ($key == 'configure' && Module::isInstalled($module->name))
{
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;