// Fix id_shop in URL

This commit is contained in:
rMalie
2012-04-16 09:45:19 +00:00
parent 65ab5e2e91
commit a06ec4fa53
+1 -1
View File
@@ -286,7 +286,7 @@ class ShopCore extends ObjectModel
{
// If in admin, we can access to the shop without right URL
$shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
$shop->physical_uri = str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_NAME']))).'/';
$shop->physical_uri = preg_replace('#/+#', '/', str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_NAME']))).'/');
$shop->virtual_uri = '';
return $shop;
}