mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
[ticket/11574] Only fall back to install/update versions, when IN_INSTALL ;)
PHPBB3-11574
This commit is contained in:
parent
fe7823b668
commit
3bccd10ccd
2 changed files with 6 additions and 4 deletions
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue