mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
#3485 - Tweak admin help text check
now also respects Admin Area Interface Language following the 'Default Site Language' setting
This commit is contained in:
@@ -172,10 +172,17 @@ class admin_shortcodes
|
|||||||
|
|
||||||
if(strpos(e_SELF, e_ADMIN_ABS) !== false)
|
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;
|
$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))
|
elseif (is_readable(e_LANGUAGEDIR.'English/admin/help/'.e_PAGE))
|
||||||
{
|
{
|
||||||
$helpfile = e_LANGUAGEDIR.'English/admin/help/'.e_PAGE;
|
$helpfile = e_LANGUAGEDIR.'English/admin/help/'.e_PAGE;
|
||||||
|
Reference in New Issue
Block a user