From e002124e57fcb842136a471990075bcee4cd8316 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 da56996026f80f1d7859b1fda2abf41c476ac9bd 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 03eadb3d6a411677f72a45263c63f7a0b114fb98 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 dface458a9d48c399886dc390d3c3509be3e561b 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(); }