[-] BO: fixed bad set of display status set in AdminCMS

This commit is contained in:
DrÿSs
2013-03-04 16:15:29 +01:00
parent e2e1da2285
commit 7b7fe17d2b
+8 -8
View File
@@ -68,7 +68,14 @@ class AdminCmsControllerCore extends AdminController
public function renderForm()
{
if (!$this->loadObject(true))
return;
if (Validate::isLoadedObject($this->object))
$this->display = 'edit';
else
$this->display = 'add';
$this->toolbar_btn['save-and-preview'] = array(
'href' => '#',
'desc' => $this->l('Save and preview')
@@ -79,14 +86,7 @@ class AdminCmsControllerCore extends AdminController
'desc' => $this->l('Save and stay'),
);
$this->initToolbar();
if (!$this->loadObject(true))
return;
if (Validate::isLoadedObject($this->object))
$this->display = 'edit';
else
$this->display = 'add';
$categories = CMSCategory::getCategories($this->context->language->id, false);
$html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_cms_category'), 1);