From 83002ff43d256f3e52bdb94c358529f2a24bb26d Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 10 May 2012 08:50:39 +0000 Subject: [PATCH] // Set context to single shop if an employee have auth on only one shop #PSCFV-2182 --- classes/controller/AdminController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 1912a1c3d..fc2345a25 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -1692,6 +1692,11 @@ 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()))