[-] WS : Fix id_shop behavior when use WS or script
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17025 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
5c4e749522
commit
2c504d45bc
1 file changed
+4
-4
@@ -295,10 +295,6 @@ class ShopCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function initialize()
|
public static function initialize()
|
||||||
{
|
{
|
||||||
// Optimization - don't redirect and allow WS and other script to work
|
|
||||||
if (!($id_shop = Tools::getValue('id_shop')))
|
|
||||||
$_GET['id_shop'] = Configuration::get('PS_SHOP_DEFAULT');
|
|
||||||
|
|
||||||
// Find current shop from URL
|
// Find current shop from URL
|
||||||
if (!($id_shop = Tools::getValue('id_shop')) || defined('_PS_ADMIN_DIR_'))
|
if (!($id_shop = Tools::getValue('id_shop')) || defined('_PS_ADMIN_DIR_'))
|
||||||
{
|
{
|
||||||
@@ -331,6 +327,10 @@ class ShopCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optimization - don't redirect and allow WS and other script to work
|
||||||
|
if (!$id_shop)
|
||||||
|
$id_shop = Configuration::get('PS_SHOP_DEFAULT');
|
||||||
|
|
||||||
// If an URL was found but is not the main URL, redirect to main URL
|
// If an URL was found but is not the main URL, redirect to main URL
|
||||||
if ($id_shop && !$is_main_uri)
|
if ($id_shop && !$is_main_uri)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user