From f7b593d9d00f6755421c73ec2f0a2d35df54236c Mon Sep 17 00:00:00 2001 From: rMalie Date: Fri, 11 May 2012 09:55:21 +0000 Subject: [PATCH] // Fix admin controller --- classes/controller/AdminController.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index ec0b097c8..cb033ef29 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -1670,6 +1670,8 @@ class AdminControllerCore extends Controller } elseif (!Shop::isFeatureActive()) $this->context->cookie->shopContext = 's-'.Configuration::get('PS_SHOP_DEFAULT'); + else if (Shop::getTotalShops(false, null) < 2) + $this->context->cookie->shopContext = 's-'.$this->context->employee->getDefaultShopID(); $shop_id = ''; Shop::setContext(Shop::CONTEXT_ALL); @@ -1700,11 +1702,6 @@ class AdminControllerCore extends Controller } } } - else if (Shop::getTotalShops(false, null) < 2) - { - $shop_id = $this->context->employee->getDefaultShopID(); - Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); - } // Check multishop context and set right context if need if (!($this->multishop_context & Shop::getContext()))