1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

Hides empty admin-navigation menu categories when access has not been granted to these areas.

This commit is contained in:
Cameron
2015-06-06 02:33:23 -07:00
parent 34ac81c019
commit 143784974d
5 changed files with 93 additions and 31 deletions

View File

@@ -35,18 +35,19 @@ if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'boots
}
// Check Admin-Perms for current language and redirect if necessary.
if(deftrue("MULTILANG_SUBDOMAIN") && !getperms('0') && !getperms(e_LANGUAGE))
if(!getperms('0') && vartrue($pref['multilanguage']) && !getperms(e_LANGUAGE))
{
$lng = e107::getLanguage();
$lng = e107::getLanguage();
$tmp = explode(".",ADMINPERMS);
foreach($tmp as $ln)
{
if($lng->isValid($ln))
{
$redirect = $lng->subdomainUrl($ln);
// echo "redirect to: ".$redirect;
e107::getRedirect()->redirect($redirect);
$redirect = deftrue("MULTILANG_SUBDOMAIN") ? $lng->subdomainUrl($ln) : e_SELF."?elan=".$ln;
// echo "redirect to: ".$redirect;
e107::getRedirect()->go($redirect);
// break;
}
}
}