diff options
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index e97f3ac8e6..35edf92749 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1627,9 +1627,18 @@ class user extends session // - add appropriate variables here, name them as they are used within the language file... if (!$use_db) { - if ((include($this->lang_path . (($use_help) ? 'help_' : '') . "$lang_file.$phpEx")) === false) + if ($use_help && strpos($lang_file, '/') !== false) { - trigger_error("Language file {$this->lang_path}" . (($use_help) ? 'help_' : '') . "$lang_file.$phpEx couldn't be opened.", E_USER_ERROR); + $language_filename = $this->lang_path . substr($lang_file, 0, stripos($lang_file, '/') + 1) . 'help_' . substr($lang_file, stripos($lang_file, '/') + 1) . '.' . $phpEx; + } + else + { + $language_filename = $this->lang_path . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx; + } + + if ((include($language_filename)) === false) + { + trigger_error("Language file $language_filename couldn't be opened.", E_USER_ERROR); } } else if ($use_db) |