From d02fd32e460d22ff84074e122ab256355e694b0d Mon Sep 17 00:00:00 2001 From: aNiassy Date: Mon, 10 Oct 2011 13:19:40 +0000 Subject: [PATCH] [-] FO-BO: #PSFV-95 : deleted some treatments for avoid code repeated --- classes/shop/Shop.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index df9a43d2a..9d64a029d 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -585,43 +585,6 @@ class ShopCore extends ObjectModel else if ($type == 'group') return $shop_group_id; return array($shop_id, $shop_group_id); - - if (!$executed) - { - $context = Context::getContext(); - if (defined('_PS_ADMIN_DIR_')) - { - // While cookie is not instancied in admin, we wait ... - if (!isset($context->cookie)) - return ($type == 'shop' || $type == 'group') ? '' : array('', ''); - - // Parse shopContext cookie value (E.g. s-2, g-4) - $split = explode('-', $context->cookie->shopContext); - if (count($split) == 2) - { - if ($split[0] == 's') - $shop_id = (int)$split[1]; - else if ($split[0] == 'g') - $shop_group_id = (int)$split[1]; - - if ($shop_id && !$shop_group_id) - $shop_group_id = Shop::getGroupFromShop($shop_id); - } - } - else - { - - $shop_id = (int)$context->shop->getID(); - $shop_group_id = (int)$context->shop->id_group_shop; - } - $executed = true; - } - - if ($type == 'shop') - return $shop_id; - else if ($type == 'group') - return $shop_group_id; - return array($shop_id, $shop_group_id); } /**