[-] 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
+12 -1
View File
@@ -153,4 +153,15 @@ class ShopGroupCore extends ObjectModel
return false;
}
}
public function shopNameExists($name, $id_shop = false)
{
return Db::getInstance()->getValue('
SELECT id_shop
FROM '._DB_PREFIX_.'shop
WHERE name = "'.pSQL($name).'"
AND id_shop_group = '.(int)$this->id.'
'.($id_shop ? 'AND id_shop != '.(int)$id_shop : '')
);
}
}