From 7b7fe17d2ba5c0f36b52d378902969892567de3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dr=C3=BFSs?= Date: Mon, 4 Mar 2013 16:15:29 +0100 Subject: [PATCH] [-] BO: fixed bad set of display status set in AdminCMS --- controllers/admin/AdminCmsController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php index 64bffae44..9d10059cb 100644 --- a/controllers/admin/AdminCmsController.php +++ b/controllers/admin/AdminCmsController.php @@ -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);