diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-06-10 13:56:32 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-13 09:57:56 +0200 |
commit | deac5f53e3e4131c315c93ce1324899da08d233e (patch) | |
tree | 6e3ef3c43ea8e962497063a898bdf291ef96d5f0 /phpBB | |
parent | f11993c0382d6942a14b37686d2c00dac97a6748 (diff) | |
download | forums-deac5f53e3e4131c315c93ce1324899da08d233e.tar forums-deac5f53e3e4131c315c93ce1324899da08d233e.tar.gz forums-deac5f53e3e4131c315c93ce1324899da08d233e.tar.bz2 forums-deac5f53e3e4131c315c93ce1324899da08d233e.tar.xz forums-deac5f53e3e4131c315c93ce1324899da08d233e.zip |
[ticket/11574] Load new language files whenever possible
PHPBB3-11574
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/install/index.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 90cd71d7f3..5494b57610 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -186,11 +186,23 @@ if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_r } // And finally, load the relevant language files -include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx); +$load_lang_files = array('common', 'acp/common', 'acp/board', 'install', 'posting'); +$new_path = $phpbb_root_path . 'install/update/new/language/' . $language . '/'; +$old_path = $phpbb_root_path . 'language/' . $language . '/'; + +// NOTE: we can not use "phpbb_include_updated" as the files uses vars which would be required +// to be global while loading. +foreach ($load_lang_files as $lang_file) +{ + if (file_exists($new_path . $lang_file . '.' . $phpEx)) + { + include($new_path . $lang_file . '.' . $phpEx); + } + else + { + include($old_path . $lang_file . '.' . $phpEx); + } +} // usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :( |