From 526d2cac1ae68d8eea143cccb32c84ec104db58a Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Mon, 28 May 2012 14:48:09 +0000 Subject: [PATCH] [-] BO : #PSCFV-2569 - Fix CMS category duplication git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15713 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminCmsCategoriesController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminCmsCategoriesController.php b/controllers/admin/AdminCmsCategoriesController.php index e8a383684..f841cba6a 100644 --- a/controllers/admin/AdminCmsCategoriesController.php +++ b/controllers/admin/AdminCmsCategoriesController.php @@ -35,12 +35,12 @@ class AdminCmsCategoriesControllerCore extends AdminController public function __construct() { $this->table = 'cms_category'; - $this->className = 'CMSCategory'; - $this->lang = true; + $this->className = 'CMSCategory'; + $this->lang = true; $this->addRowAction('view'); $this->addRowAction('edit'); $this->addRowAction('delete'); - $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array( 'id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), @@ -86,6 +86,7 @@ class AdminCmsCategoriesControllerCore extends AdminController $this->action = 'save'; if ($id_cms_category = (int)Tools::getValue('id_cms_category')) { + $this->id_object = $id_cms_category; if (!CMSCategory::checkBeforeMove($id_cms_category, (int)Tools::getValue('id_parent'))) { $this->errors[] = Tools::displayError('CMS Category cannot be moved here'); @@ -193,7 +194,7 @@ class AdminCmsCategoriesControllerCore extends AdminController else $this->errors[] = Tools::displayError('You do not have permission to delete here.'); } - parent::postProcess(true); + parent::postProcess(); } public function renderForm()