// Fix useless instance of modules in FrontController

This commit is contained in:
rMalie
2012-06-07 12:03:54 +00:00
parent 0e8dd769a9
commit ef8a2b6a43

View File

@@ -263,11 +263,12 @@ class FrontControllerCore extends Controller
$module_name = '';
if (Validate::isModuleName(Tools::getValue('module')))
$module_name = Tools::getValue('module');
if (!empty($this->page_name))
$page_name = $this->page_name;
elseif (!empty($this->php_self))
$page_name = $this->php_self;
elseif (Tools::getValue('fc') == 'module' && $module_name != '' && new $module_name() instanceof PaymentModule)
elseif (Tools::getValue('fc') == 'module' && $module_name != '' && is_a($module_name, 'PaymentModule'))
$page_name = 'module-payment-submit';
// @retrocompatibility Are we in a module ?
elseif (preg_match('#^'.preg_quote($this->context->shop->physical_uri, '#').'modules/([a-zA-Z0-9_-]+?)/(.*)$#', $_SERVER['REQUEST_URI'], $m))