diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-06-10 13:50:15 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-13 09:57:56 +0200 |
commit | 8aca9635f57630b89615d888cc8b92f5ac9b327c (patch) | |
tree | c219331592d598ce6e55674ffc5b4d9d3097c8fd /phpBB | |
parent | 06caac044479c3ff41f48157f40e8cb00e3d5e84 (diff) | |
download | forums-8aca9635f57630b89615d888cc8b92f5ac9b327c.tar forums-8aca9635f57630b89615d888cc8b92f5ac9b327c.tar.gz forums-8aca9635f57630b89615d888cc8b92f5ac9b327c.tar.bz2 forums-8aca9635f57630b89615d888cc8b92f5ac9b327c.tar.xz forums-8aca9635f57630b89615d888cc8b92f5ac9b327c.zip |
[ticket/11574] Find language files in update/new before throwing an error
PHPBB3-11574
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/user.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index 5530fe3f03..f823e85148 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -592,6 +592,18 @@ class phpbb_user extends phpbb_session if (!file_exists($language_filename)) { + // File was not found, try to find it in update directory + $orig_language_filename = $language_filename; + $language_filename = str_replace('language/', 'install/update/new/language/', $language_filename); + if (!file_exists($language_filename)) + { + // Not found either, go back to the original file name + $language_filename = $orig_language_filename; + } + } + + if (!file_exists($language_filename)) + { global $config; if ($this->lang_name == 'en') |