Order
This commit is contained in:
parent
e2335e71b7
commit
9acc6e29d5
@ -365,8 +365,6 @@ class AdminGuideCategories extends AdminTab
|
||||
if (!sizeof($this->_list)) {
|
||||
echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>';
|
||||
}
|
||||
|
||||
$this->_orderBy = 'position';
|
||||
|
||||
// Show the content of the table
|
||||
$this->displayListContent();
|
||||
@ -379,7 +377,7 @@ class AdminGuideCategories extends AdminTab
|
||||
public function viewguide_category()
|
||||
{
|
||||
global $cookie;
|
||||
$this->getList((int)($cookie->id_lang));
|
||||
$this->getList((int)($cookie->id_lang), 'position');
|
||||
$this->displayList();
|
||||
$this->displayOptionsList();
|
||||
$this->displayRequiredFields();
|
||||
|
@ -107,7 +107,9 @@ class AdminGuidePosts extends AdminTab
|
||||
|
||||
public function displayList()
|
||||
{
|
||||
$this->_orderBy = 'position';
|
||||
if (Tools::getIsset('id_guide_category')) {
|
||||
$this->_orderBy = 'position';
|
||||
}
|
||||
parent::displayList();
|
||||
}
|
||||
|
||||
|
@ -182,10 +182,8 @@ class GuideCategory extends ObjectModel
|
||||
|
||||
public function update($autodate = true, $nullValues = false)
|
||||
{
|
||||
$this->position = self::getLastPosition((int)$this->id_parent);
|
||||
$ret = parent::update($autodate, $nullValues);
|
||||
$this->cleanupPositions((int)$this->id_parent);
|
||||
return $ret;
|
||||
self::cleanupPositions((int)$this->id_parent);
|
||||
return parent::update($autodate, $nullValues);
|
||||
}
|
||||
|
||||
public function delete()
|
||||
|
@ -127,7 +127,7 @@ class GuidePost extends ObjectModel
|
||||
|
||||
public function update($autodate = true, $nullValues = false)
|
||||
{
|
||||
$this->position = self::cleanupPositions((int)$this->id_guide_category);
|
||||
self::cleanupPositions((int)$this->id_guide_category);
|
||||
return parent::update($autodate, $nullValues);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user