From 9b6ff354ede122f11c17ed6fda928cfd6cd373e6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 2 Apr 2013 16:21:27 +0400 Subject: [PATCH 1/4] [FIX] Critical bug in Cotroller class --- classes/controller/Controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/controller/Controller.php b/classes/controller/Controller.php index 7e4ebf6ed..570a5a1e7 100644 --- a/classes/controller/Controller.php +++ b/classes/controller/Controller.php @@ -175,9 +175,9 @@ abstract class ControllerCore // then using displayAjax[action] if ($this->ajax) { - $action = Tools::getValue('action'); - if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true))) - $this->{'displayAjax'.$action}(); + $action = 'displayAjax' . Tools::toCamelCase(Tools::getValue('action', true)); + if (!empty($action) && method_exists($this, $action)) + $this->{$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax(); } From 8445bb4a9402d2cbbac23d5e484fbdb0f34fb3a4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 2 Apr 2013 16:26:41 +0400 Subject: [PATCH 2/4] And in profiler too --- tools/profiling/Controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/profiling/Controller.php b/tools/profiling/Controller.php index 1b55dd0dd..41dc03ead 100644 --- a/tools/profiling/Controller.php +++ b/tools/profiling/Controller.php @@ -227,9 +227,9 @@ abstract class Controller extends ControllerCore // then using displayAjax[action] if ($this->ajax) { - $action = Tools::getValue('action'); - if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action))) - $this->{'displayAjax'.$action}(); + $action = 'displayAjax' . Tools::toCamelCase(Tools::getValue('action', true)); + if (!empty($action) && method_exists($this, $action)) + $this->{$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax(); } From a93cfbec07432ce9104e32075eb5da3871899d85 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 16 Apr 2013 13:39:42 +0400 Subject: [PATCH 3/4] Remove spaces before and after dot --- classes/controller/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/controller/Controller.php b/classes/controller/Controller.php index 570a5a1e7..0d4591455 100644 --- a/classes/controller/Controller.php +++ b/classes/controller/Controller.php @@ -175,9 +175,9 @@ abstract class ControllerCore // then using displayAjax[action] if ($this->ajax) { - $action = 'displayAjax' . Tools::toCamelCase(Tools::getValue('action', true)); + $action = Tools::toCamelCase(Tools::getValue('action', true)); if (!empty($action) && method_exists($this, $action)) - $this->{$action}(); + $this->{'displayAjax'.$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax(); } From 5ab4c183969bf71e2df3e63edbeb9a5ece7cda5f Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 16 Apr 2013 13:43:24 +0400 Subject: [PATCH 4/4] Remove spaces before and after dot --- tools/profiling/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/profiling/Controller.php b/tools/profiling/Controller.php index 41dc03ead..923faccec 100644 --- a/tools/profiling/Controller.php +++ b/tools/profiling/Controller.php @@ -227,9 +227,9 @@ abstract class Controller extends ControllerCore // then using displayAjax[action] if ($this->ajax) { - $action = 'displayAjax' . Tools::toCamelCase(Tools::getValue('action', true)); + $action = 'displayAjax'.Tools::toCamelCase(Tools::getValue('action', true)); if (!empty($action) && method_exists($this, $action)) - $this->{$action}(); + $this->{'displayAjax'.$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax(); }