[-] FO : #PSFV-522 - Bug in AddressController with Address Alias

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13375 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-16 09:19:30 +00:00
parent 4f62932de8
commit 49ce44cabb
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -182,7 +182,10 @@ class AddressControllerCore extends FrontController
&& Db::getInstance()->getValue('
SELECT count(*)
FROM '._DB_PREFIX_.'address
WHERE `alias` = \''.pSql($_POST['alias']).'\' AND id_customer = '.(int)$this->context->customer->id) > 0)
WHERE `alias` = \''.pSql($_POST['alias']).'\'
AND id_address != '.(int)Tools::getValue('id_address').'
AND id_customer = '.(int)$this->context->customer->id.'
AND deleted = 0') > 0)
$this->errors[] = sprintf(Tools::displayError('The alias "%s" is already used, please chose an other one.'), Tools::safeOutput($_POST['alias']));
// Don't continue this process if we have errors !