From 58d205edc568c3fc537360532cb6ca2864256ad0 Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 28 Sep 2011 08:06:10 +0000 Subject: [PATCH] // add method ajaxProcess in "run" method git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8827 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Controller.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/Controller.php b/classes/Controller.php index ea83ca647..ef759255b 100644 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -111,7 +111,12 @@ abstract class ControllerCore public function run() { $this->init(); - $this->postProcess(); + + if ($this->ajax && method_exists($this, 'ajaxProcess')) + $this->ajaxProcess(); + else + $this->postProcess(); + if ($this->displayHeader) { $this->setMedia(); @@ -122,7 +127,7 @@ abstract class ControllerCore if ($this->displayFooter) $this->initFooter(); - if ($this->ajax) + if ($this->ajax && method_exists($this, 'displayAjax')) $this->displayAjax(); else $this->display();