[-] BO : fixed bug #PSCFV-4961 - Strange behavior when reordering categories

This commit is contained in:
vAugagneur
2013-01-09 13:44:19 +01:00
parent 39e4dc96d4
commit 108dfb292c
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1465,7 +1465,7 @@ class AdminControllerCore extends Controller
if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action)
$this->actions[] = $action;
}
$helper->is_cms = $this->is_cms;
$list = $helper->generateList($this->_list, $this->fields_list);
return $list;
+2 -2
View File
@@ -60,7 +60,7 @@ class HelperListCore extends Helper
/** @var array $cache_lang use to cache texts in current language */
public static $cache_lang = array();
protected $is_cms = false;
public $is_cms = false;
public $position_identifier;
@@ -174,7 +174,7 @@ class HelperListCore extends Helper
public function displayListContent()
{
if ($this->position_identifier)
$id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', '1');
$id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', ($this->is_cms ? '1' : Category::getRootCategory()->id ));
else
$id_category = Category::getRootCategory()->id;
@@ -168,7 +168,7 @@ class AdminCategoriesControllerCore extends AdminController
if (Shop::getContext() == Shop::CONTEXT_SHOP)
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') ';
else
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = a.id_shop_default) ';
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = a.id_shop_default) ';
// we add restriction for shop
@@ -33,6 +33,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
public function __construct()
{
$this->is_cms = true;
$this->table = 'cms_category';
$this->className = 'CMSCategory';
$this->lang = true;