// Restore good page_name for controllers with - in name

This commit is contained in:
rMalie
2012-01-20 10:15:45 +00:00
parent c91094b4e6
commit 88c2cd7b2d
4 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -251,7 +251,9 @@ class FrontControllerCore extends Controller
// Are we in a payment module // Are we in a payment module
$module_name = Tools::getValue('module'); $module_name = Tools::getValue('module');
if (!empty($this->php_self)) if (!empty($this->page_name))
$page_name = $this->page_name;
else if (!empty($this->php_self))
$page_name = $this->php_self; $page_name = $this->php_self;
else if (Tools::getValue('controller') == 'module' && $module_name != '' && new $module_name() instanceof PaymentModule) else if (Tools::getValue('controller') == 'module' && $module_name != '' && new $module_name() instanceof PaymentModule)
$page_name = 'module-payment-submit'; $page_name = 'module-payment-submit';
@@ -28,6 +28,7 @@
class PageNotFoundControllerCore extends FrontController class PageNotFoundControllerCore extends FrontController
{ {
public $php_self = '404'; public $php_self = '404';
public $page_name = 'pagenotfound';
/** /**
* Assign template vars related to page content * Assign template vars related to page content
+1 -1
View File
@@ -34,7 +34,7 @@ include_once(dirname(__FILE__).'/LoyaltyStateModule.php');
class ModuleLoyaltyController extends ModuleController class ModuleLoyaltyController extends ModuleController
{ {
protected $php_self = 'module-loyalty-loyalty-program'; protected $page_name = 'module-loyalty-loyalty-program';
/** /**
* @see FrontController::postProcess() * @see FrontController::postProcess()
+1 -1
View File
@@ -60,7 +60,7 @@
{$HOOK_HEADER} {$HOOK_HEADER}
</head> </head>
<body {if isset($page_name)}id="{if $page_name eq '404'}pagenotfound{else}{$page_name|escape:'htmlall':'UTF-8'}{/if}"{/if}> <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}>
{if !$content_only} {if !$content_only}
{if isset($restricted_country_mode) && $restricted_country_mode} {if isset($restricted_country_mode) && $restricted_country_mode}
<div id="restricted-country"> <div id="restricted-country">