// Multishop interface reworked

This commit is contained in:
rMalie
2012-05-09 15:05:39 +00:00
parent 7920dea947
commit d7337c4d4f
61 changed files with 6043 additions and 391 deletions
-37
View File
@@ -164,41 +164,4 @@ class ShopUrlCore extends ObjectModel
}
return self::$main_domain_ssl;
}
/**
* @static
* @param string $virtual_uri
* @param int $id_shop_tested
* @return bool
*/
public static function virtualUriExists($virtual_uri, $id_shop_tested)
{
Tools::displayAsDeprecated();
$virtual_uri = trim($virtual_uri);
if (substr($virtual_uri, -1) != '/')
$virtual_uri .= '/';
return (bool) Db::getInstance()->getValue('
SELECT `virtual_uri`
FROM `'._DB_PREFIX_.'shop_url`
WHERE `id_shop` != '.(int)$id_shop_tested.'
AND `virtual_uri` = "'.pSQL($virtual_uri).'"');
}
/**
* @static
* @param string $domain
* @param string $physical_uri
* @param string $virtual_uri
* @param int $id_shop_tested
* @return bool
*/
public static function urlExists($domain, $physical_uri, $virtual_uri, $id_shop_tested)
{
$url = $domain.$physical_uri.$virtual_uri;
return (bool)Db::getInstance()->getValue('
SELECT *
FROM `'._DB_PREFIX_.'shop_url`
WHERE `id_shop` != '.(int)$id_shop_tested.'
AND CONCAT(`domain`, `physical_uri`, `virtual_uri`) ="'.pSQL($url).'"');
}
}