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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user