[-] FO: Fix #PSCFV-9325 all was included on 301 for root deprecated controllers

This commit is contained in:
Rémi Gaillard
2013-06-27 15:41:37 +02:00
parent 3524ccc99b
commit 17579de481
38 changed files with 50 additions and 44 deletions
+2 -7
View File
@@ -226,13 +226,8 @@ class AdminShopControllerCore extends AdminController
if (Tools::isSubmit('submitAddshopAndStay') || Tools::isSubmit('submitAddshop'))
{
$same_name = Db::getInstance()->getValue('
SELECT id_shop
FROM '._DB_PREFIX_.'shop
WHERE name = "'.pSQL(Tools::getValue('name')).'"
AND id_shop_group = '.(int)Tools::getValue('id_shop_group').'
'.(Tools::getValue('id_shop') ? 'AND id_shop != '.(int)Tools::getValue('id_shop') : ''));
if ($same_name)
$shop_group = new ShopGroup((int)Tools::getValue('id_shop_group'));
if ($shop_group->shopNameExists(Tools::getValue('name'), (int)Tools::getValue('id_shop')))
$this->errors[] = Tools::displayError('You cannot have two shops with the same name in the same group.');
}