// revert AdminController

This commit is contained in:
rGaillard
2011-10-28 13:06:44 +00:00
parent 02bf347621
commit 0e2802533b
+29 -27
View File
@@ -122,42 +122,44 @@ abstract class ControllerCore
{ {
$this->init(); $this->init();
// postProcess handles ajaxProcess if ($this->checkAccess())
$this->postProcess();
if ($this->display_header || (isset($this->className) && $this->className))
{ {
$this->setMedia(); // postProcess handles ajaxProcess
$this->initHeader();
}
$this->initContent();
if ($this->display_footer || (isset($this->className) && $this->className))
$this->initFooter();
// postProcess handles ajaxProcess
$this->postProcess(); $this->postProcess();
if ($this->display_header) if ($this->display_header || (isset($this->className) && $this->className))
{ {
$this->setMedia(); $this->setMedia();
$this->initHeader(); $this->initHeader();
} }
$this->initContent(); $this->initContent();
if ($this->display_footer) if ($this->display_footer || (isset($this->className) && $this->className))
$this->initFooter(); $this->initFooter();
// postProcess handles ajaxProcess
$this->postProcess();
if ($this->display_header)
{
$this->setMedia();
$this->initHeader();
}
$this->initContent();
if ($this->display_footer)
$this->initFooter();
// default behavior for ajax process is to use $_POST[action] or $_GET[action] // default behavior for ajax process is to use $_POST[action] or $_GET[action]
// then using displayAjax[action] // then using displayAjax[action]
if ($this->ajax) if ($this->ajax)
{ {
$action = Tools::getValue('action'); $action = Tools::getValue('action');
if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action))) if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action)))
$this->{'displayAjax'.$action}(); $this->{'displayAjax'.$action}();
elseif (method_exists($this, 'displayAjax')) elseif (method_exists($this, 'displayAjax'))
$this->displayAjax(); $this->displayAjax();
} }
} }
else else
$this->initCursedPage(); $this->initCursedPage();