1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

[ticket/11574] Find language files in update/new before throwing an error

PHPBB3-11574
This commit is contained in:
Joas Schilling 2013-06-10 13:50:15 +02:00
parent 06caac0444
commit 8aca9635f5

View File

@ -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;