[-] BO : fixed bug #PSCFV-2342 - fix issue on Admin Tab position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15398 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -88,6 +88,11 @@ class AdminTabsControllerCore extends AdminController
|
||||
public function renderForm()
|
||||
{
|
||||
$tabs = Tab::getTabs($this->context->language->id, 0);
|
||||
// If editing, we clean itself
|
||||
if (Tools::isSubmit('id_tab'))
|
||||
foreach ($tabs as $key => $tab)
|
||||
if ($tab['id_tab'] == Tools::getValue('id_tab'))
|
||||
unset($tabs[$key]);
|
||||
|
||||
// added category "Home" in var $tabs
|
||||
$tab_zero = array(
|
||||
@@ -254,11 +259,11 @@ class AdminTabsControllerCore extends AdminController
|
||||
if ($tab->move($direction))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
|
||||
}
|
||||
else if (Tools::getValue('position') && !Tools::isSubmit('submitAdd'.$this->table))
|
||||
elseif (Tools::getValue('position') && !Tools::isSubmit('submitAdd'.$this->table))
|
||||
{
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
else if (!Validate::isLoadedObject($object = new Tab((int)Tools::getValue($this->identifier))))
|
||||
elseif (!Validate::isLoadedObject($object = new Tab((int)Tools::getValue($this->identifier))))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').
|
||||
' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
@@ -266,6 +271,8 @@ class AdminTabsControllerCore extends AdminController
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminTabs'));
|
||||
}
|
||||
elseif (Tools::isSubmit('submitAddtab') && Tools::getValue('id_tab') == Tools::getValue('id_parent'))
|
||||
$this->errors[] = Tools::displayError('You can\'t put this tab in itself');
|
||||
else
|
||||
{
|
||||
// Temporary add the position depend of the selection of the parent category
|
||||
@@ -314,4 +321,4 @@ class AdminTabsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ $_ERRORS['592a291120e1c687a70e6d1a53259a28'] = 'La base de données de géolocal
|
||||
$_ERRORS['59382adebc7f0d65c42fe773d443e4c7'] = 'Ce code ISO est déjà lié à une autre langue.';
|
||||
$_ERRORS['5a6448a8d8e77fa43df91db2eea79fb1'] = 'Ce bon de réduction est désactivé';
|
||||
$_ERRORS['5a69d1cb0ef4096b272b3b441555d737'] = 'Vous n\'avez pas la permission de configurer ce module.';
|
||||
$_ERRORS['5abbf1d644e48c9d704c1f57dc38f757'] = 'Vous ne pouvez pas placer cet onglet dans lui-même';
|
||||
$_ERRORS['5aee207224baebde35a0b0009b8e74a9'] = 'Un élément de votre panier n\'est plus disponible pour cette quantité, vous ne pouvez pas continuer votre commande.';
|
||||
$_ERRORS['5af5f631f774a71445e3028253874394'] = 'Ce magasin n\'a pas accepté votre nouvelle commande.';
|
||||
$_ERRORS['5b19b5178c34a3c0af13b0edc231efb8'] = 'L\'identifiant de transaction n\'est pas valable';
|
||||
|
||||
Reference in New Issue
Block a user