// Fix admin modules positions

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8098 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-17 15:30:44 +00:00
parent acfa8d8600
commit 89bc665d48
3 changed files with 42 additions and 25 deletions

View File

@@ -438,7 +438,7 @@ abstract class ModuleCore
public function registerExceptions($id_hook, $excepts, $shopList = null)
{
if (is_null($shopList))
$shopList = Shop::getShops(true, null, true);
Context::getContext()->shop->getListOfID();
foreach ($shopList as $shopID)
{
@@ -460,10 +460,17 @@ abstract class ModuleCore
return true;
}
public function editExceptions($hookID, $excepts, $shopList = null)
public function editExceptions($hookID, $excepts)
{
$this->unregisterExceptions($hookID, $shopList);
return $this->registerExceptions($hookID, $excepts, $shopList);
$result = true;
foreach ($excepts as $shopID => $except)
{
$shopList = ($shopID == 0) ? Context::getContext()->shop->getListOfID() : array($shopID);
$this->unregisterExceptions($hookID, $shopList);
$result &= $this->registerExceptions($hookID, $except, $shopList);
}
return $result;
}