diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-06 19:35:42 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-13 09:57:57 +0200 |
commit | 3bccd10ccd509ae622cfd23f075fce1d1289888a (patch) | |
tree | a261849b5a2efb0f9a581fbd9665b42d7c0442cf | |
parent | fe7823b6685975012d3c033b335d7ed5fa9756d7 (diff) | |
download | forums-3bccd10ccd509ae622cfd23f075fce1d1289888a.tar forums-3bccd10ccd509ae622cfd23f075fce1d1289888a.tar.gz forums-3bccd10ccd509ae622cfd23f075fce1d1289888a.tar.bz2 forums-3bccd10ccd509ae622cfd23f075fce1d1289888a.tar.xz forums-3bccd10ccd509ae622cfd23f075fce1d1289888a.zip |
[ticket/11574] Only fall back to install/update versions, when IN_INSTALL ;)
PHPBB3-11574
-rw-r--r-- | phpBB/includes/di/extension/core.php | 3 | ||||
-rw-r--r-- | phpBB/includes/user.php | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/di/extension/core.php b/phpBB/includes/di/extension/core.php index d0a3ebdf99..4e1159e6fd 100644 --- a/phpBB/includes/di/extension/core.php +++ b/phpBB/includes/di/extension/core.php @@ -51,7 +51,8 @@ class phpbb_di_extension_core extends Extension */ public function load(array $config, ContainerBuilder $container) { - if (file_exists($this->root_path . 'install/update/new/config/services.yml')) + // If we are in install, try to use the updated version, when available + if (defined('IN_INSTALL') && file_exists($this->root_path . 'install/update/new/config/services.yml')) { $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config'))); $loader->load('services.yml'); diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index f823e85148..f8ff3b8b13 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -590,14 +590,15 @@ class phpbb_user extends phpbb_session $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx; } - if (!file_exists($language_filename)) + if (defined('IN_INSTALL')) { - // File was not found, try to find it in update directory + // If we are in install, try to use the updated version, when available $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 + // Not found, go back to the original file name $language_filename = $orig_language_filename; } } |