From a06ec4fa533b5511bac368bbea31303772aaa586 Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 16 Apr 2012 09:45:19 +0000 Subject: [PATCH] // Fix id_shop in URL --- classes/shop/Shop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 2da29397e..21365d201 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -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; }