//small refacto
This commit is contained in:
1 parent
5703e67c96
commit
b725fd2d4a
1 file changed
+8
-22
@@ -1159,33 +1159,19 @@ class AdminControllerCore extends Controller
|
|||||||
$this->context->smarty->assign('conf', Tools::jsonEncode($this->_conf[(int)$conf]));
|
$this->context->smarty->assign('conf', Tools::jsonEncode($this->_conf[(int)$conf]));
|
||||||
else
|
else
|
||||||
$this->context->smarty->assign('conf', $this->_conf[(int)$conf]);
|
$this->context->smarty->assign('conf', $this->_conf[(int)$conf]);
|
||||||
|
|
||||||
|
$notifications_type = array('errors', 'warnings', 'informations', 'confirmations');
|
||||||
if ($this->json)
|
foreach($notifications_type as $type)
|
||||||
$this->context->smarty->assign('errors', Tools::jsonEncode($this->errors));
|
if ($this->json)
|
||||||
else
|
$this->context->smarty->assign($type, Tools::jsonEncode($this->$type));
|
||||||
$this->context->smarty->assign('errors', $this->errors);
|
else
|
||||||
|
$this->context->smarty->assign($type, $this->$type);
|
||||||
if ($this->json)
|
|
||||||
$this->context->smarty->assign('warnings', Tools::jsonEncode($this->warnings));
|
|
||||||
else
|
|
||||||
$this->context->smarty->assign('warnings', $this->warnings);
|
|
||||||
|
|
||||||
|
|
||||||
if ($this->json)
|
|
||||||
$this->context->smarty->assign('informations', Tools::jsonEncode($this->informations));
|
|
||||||
else
|
|
||||||
$this->context->smarty->assign('informations', $this->informations);
|
|
||||||
|
|
||||||
if ($this->json)
|
|
||||||
$this->context->smarty->assign('confirmations', Tools::jsonEncode($this->confirmations));
|
|
||||||
else
|
|
||||||
$this->context->smarty->assign('confirmations', $this->confirmations);
|
|
||||||
|
|
||||||
if ($this->json)
|
if ($this->json)
|
||||||
$this->context->smarty->assign('page', Tools::jsonEncode($page));
|
$this->context->smarty->assign('page', Tools::jsonEncode($page));
|
||||||
else
|
else
|
||||||
$this->context->smarty->assign('page', $page);
|
$this->context->smarty->assign('page', $page);
|
||||||
|
|
||||||
$this->smartyOutputContent($this->layout);
|
$this->smartyOutputContent($this->layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user