This commit is contained in:
Rémi Gaillard committed 2013-04-18 11:36:55 +02:00
1 parent 5a815e7b19
commit be250c9ecc
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -175,8 +175,8 @@ abstract class ControllerCore
// then using displayAjax[action] // then using displayAjax[action]
if ($this->ajax) if ($this->ajax)
{ {
$action = Tools::toCamelCase(Tools::getValue('action', true)); $action = Tools::getValue('action');
if (!empty($action) && method_exists($this, $action)) if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true)))
$this->{'displayAjax'.$action}(); $this->{'displayAjax'.$action}();
elseif (method_exists($this, 'displayAjax')) elseif (method_exists($this, 'displayAjax'))
$this->displayAjax(); $this->displayAjax();
+2 -2
View File
@@ -227,8 +227,8 @@ abstract class Controller extends ControllerCore
// then using displayAjax[action] // then using displayAjax[action]
if ($this->ajax) if ($this->ajax)
{ {
$action = 'displayAjax'.Tools::toCamelCase(Tools::getValue('action', true)); $action = Tools::getValue('action');
if (!empty($action) && method_exists($this, $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();