1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Fixed - admin language perms were not being checked.

This commit is contained in:
Cameron
2013-10-28 12:57:27 -07:00
parent f8987b6cc2
commit bdf3fdef13
2 changed files with 21 additions and 13 deletions

View File

@@ -34,6 +34,24 @@ if($core->get('admintheme') != 'bootstrap')
e107::getRedirect()->redirect(e_SELF);
}
// Check Admin-Perms for current language and redirect if necessary.
if(MULTILANG_SUBDOMAIN && !getperms('0') && !getperms(e_LANGUAGE))
{
$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);
}
}
}
/* done in class2
@include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php");
@include_once(e_LANGUAGEDIR."English/admin/lan_admin.php");