[-] BO : #PSTEST-776 - Fix bug with attribute order change
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helpers/list/list_header.tpl"}
|
||||
{block name=leadin}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(location.hash).click();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -557,13 +557,13 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
else if (!$object = new Attribute((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 (Tools::getValue('position') && Tools::getValue('id_attribute'))
|
||||
if (Tools::getValue('position') !== false && Tools::getValue('id_attribute'))
|
||||
{
|
||||
$_POST['id_attribute_group'] = $object->id_attribute_group;
|
||||
if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
$this->errors[] = Tools::displayError('Failed to update the position.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminAttributesGroups'));
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminAttributesGroups').'#details_details_'.$object->id_attribute_group);
|
||||
}
|
||||
else if (Tools::isSubmit('deleteattribute') && Tools::getValue('id_attribute'))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user