diff --git a/admin-dev/init.php b/admin-dev/init.php index 139216cb6..4319eba40 100644 --- a/admin-dev/init.php +++ b/admin-dev/init.php @@ -93,5 +93,6 @@ $context->employee = $employee; $context->cookie = $cookie; $context->link = $link; $context->language = $language; +$context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $context->country = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); $context->shop = new Shop(Shop::getContext('shop', true)); \ No newline at end of file diff --git a/admin-dev/tabs/AdminAccess.php b/admin-dev/tabs/AdminAccess.php index 652a4f0cf..7bbc19bb9 100644 --- a/admin-dev/tabs/AdminAccess.php +++ b/admin-dev/tabs/AdminAccess.php @@ -63,13 +63,13 @@ class AdminAccess extends AdminTab public function displayForm($isMainTab = true) { - global $cookie, $currentIndex; + $context = Context::getContext(); parent::displayForm(); $currentProfile = (int)($this->getCurrentProfileId()); - $tabs = Tab::getTabs($cookie->id_lang); - $profiles = Profile::getProfiles((int)($cookie->id_lang)); - $accesses = Profile::getProfileAccesses((int)($currentProfile)); + $tabs = Tab::getTabs($context->language->id); + $profiles = Profile::getProfiles($context->language->id); + $accesses = Profile::getProfileAccesses($context->language->id); echo '