[-] FO: Fix #PSCFV-9325 all was included on 301 for root deprecated controllers
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user