From 6fd0a6a8a293e09a9ded947b39bfab75305a3a9f Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Fri, 29 Mar 2019 16:06:59 +0100 Subject: [PATCH] #3485 - Tweak admin help text check now also respects Admin Area Interface Language following the 'Default Site Language' setting --- e107_core/shortcodes/batch/admin_shortcodes.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 2d6ac5c62..437edaa0f 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -171,11 +171,18 @@ class admin_shortcodes $helpfile = ''; if(strpos(e_SELF, e_ADMIN_ABS) !== false) - { - if (is_readable(e_LANGUAGEDIR.'/'.$pref['adminlanguage'].'/admin/help/'.e_PAGE)) + { + // check if admin area language pref is set to follow 'Default Site Language + if(!$pref['adminlanguage'] && is_readable(e_LANGUAGEDIR.e_LANGUAGE.'/admin/help/'.e_PAGE)) + { + $helpfile = e_LANGUAGEDIR.e_LANGUAGE.'/admin/help/'.e_PAGE; + } + // language is set to specific language + elseif(is_readable(e_LANGUAGEDIR.'/'.$pref['adminlanguage'].'/admin/help/'.e_PAGE)) { $helpfile = e_LANGUAGEDIR.'/'.$pref['adminlanguage'].'/admin/help/'.e_PAGE; } + // fallback to default English files (in case help texts are missing) elseif (is_readable(e_LANGUAGEDIR.'English/admin/help/'.e_PAGE)) { $helpfile = e_LANGUAGEDIR.'English/admin/help/'.e_PAGE;