Skip to content

Commit

Permalink
#3485 - Tweak admin help text check
Browse files Browse the repository at this point in the history
now also respects Admin Area Interface Language following the 'Default Site Language' setting
  • Loading branch information
Moc committed Mar 29, 2019
1 parent 67129d7 commit 6fd0a6a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions e107_core/shortcodes/batch/admin_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,18 @@ function sc_admin_help()
$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;
Expand Down

0 comments on commit 6fd0a6a

Please sign in to comment.