[-] BO : fixed bug #PSCFV-4961 - Strange behavior when reordering categories
This commit is contained in:
@@ -1465,7 +1465,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action)
|
if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action)
|
||||||
$this->actions[] = $action;
|
$this->actions[] = $action;
|
||||||
}
|
}
|
||||||
|
$helper->is_cms = $this->is_cms;
|
||||||
$list = $helper->generateList($this->_list, $this->fields_list);
|
$list = $helper->generateList($this->_list, $this->fields_list);
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class HelperListCore extends Helper
|
|||||||
/** @var array $cache_lang use to cache texts in current language */
|
/** @var array $cache_lang use to cache texts in current language */
|
||||||
public static $cache_lang = array();
|
public static $cache_lang = array();
|
||||||
|
|
||||||
protected $is_cms = false;
|
public $is_cms = false;
|
||||||
|
|
||||||
public $position_identifier;
|
public $position_identifier;
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ class HelperListCore extends Helper
|
|||||||
public function displayListContent()
|
public function displayListContent()
|
||||||
{
|
{
|
||||||
if ($this->position_identifier)
|
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
|
else
|
||||||
$id_category = Category::getRootCategory()->id;
|
$id_category = Category::getRootCategory()->id;
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
if (Shop::getContext() == Shop::CONTEXT_SHOP)
|
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.') ';
|
$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
|
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
|
// we add restriction for shop
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$this->is_cms = true;
|
||||||
$this->table = 'cms_category';
|
$this->table = 'cms_category';
|
||||||
$this->className = 'CMSCategory';
|
$this->className = 'CMSCategory';
|
||||||
$this->lang = true;
|
$this->lang = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user