From 8aca9635f57630b89615d888cc8b92f5ac9b327c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:50:15 +0200 Subject: [PATCH] [ticket/11574] Find language files in update/new before throwing an error PHPBB3-11574 --- phpBB/includes/user.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 @@ -590,6 +590,18 @@ class phpbb_user extends phpbb_session $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx; } + 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;