1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Allow for disabling of language-perm checking on a page-by-page basis. Usage: $_E107['no_language_perm_check'] = true; before class2.php.

Allow language to be defined by script. Usage Example: define("e_PAGE_LANGUAGE", "French"); OR define("e_PAGE_LANGUAGE", "E_SITELANGUAGE"); before class2.php.
This commit is contained in:
Cameron
2015-09-03 16:19:39 -07:00
parent 296e049ad7
commit caa89c9c3e
2 changed files with 27 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ define('e_CAPTCHA_FONTCOLOR','#F9A533');
// Required for a clean v1.x -> v2 upgrade.
$core = e107::getConfig('core');
if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'bootstrap3')
if($core->get('admintheme') != 'bootstrap3')
{
$core->update('admintheme','bootstrap3');
$core->update('adminstyle','infopanel');
@@ -35,7 +35,7 @@ if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'boots
}
// Check Admin-Perms for current language and redirect if necessary.
if(USER && !getperms('0') && vartrue($pref['multilanguage']) && !getperms(e_LANGUAGE))
if(USER && !getperms('0') && vartrue($pref['multilanguage']) && !getperms(e_LANGUAGE) && empty($_E107['no_language_perm_check']))
{
$lng = e107::getLanguage();