Merge pull request #366 from kluevandrew/patch-2

[FIX] Bug in Controller class
This commit is contained in:
Vincent Augagneur
2013-04-16 06:13:48 -07:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -175,8 +175,8 @@ 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)))
$action = Tools::toCamelCase(Tools::getValue('action', true));
if (!empty($action) && method_exists($this, $action))
$this->{'displayAjax'.$action}();
elseif (method_exists($this, 'displayAjax'))
$this->displayAjax();
+2 -2
View File
@@ -227,8 +227,8 @@ 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)))
$action = 'displayAjax'.Tools::toCamelCase(Tools::getValue('action', true));
if (!empty($action) && method_exists($this, $action))
$this->{'displayAjax'.$action}();
elseif (method_exists($this, 'displayAjax'))
$this->displayAjax();