// Set context to single shop if an employee have auth on only one shop #PSCFV-2182

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15144 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-05-10 08:50:39 +00:00
parent dc10a038d1
commit 5a6fe7aff2
+5
View File
@@ -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()))