Skip to content

Commit

Permalink
[ticket/11574] Make install language filename less crazy
Browse files Browse the repository at this point in the history
PHPBB3-11574
  • Loading branch information
igorw authored and nickvergessen committed Jul 13, 2013
1 parent 1dea028 commit 51ab2c7
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions phpBB/includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,17 +590,11 @@ function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false
$language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx;
}

if (defined('IN_INSTALL'))
// If we are in install, try to use the updated version, when available
$install_language_filename = str_replace('language/', 'install/update/new/language/', $language_filename);
if (defined('IN_INSTALL') && file_exists($install_language_filename))
{
// 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, go back to the original file name
$language_filename = $orig_language_filename;
}
$language_filename = $install_language_filename;
}

if (!file_exists($language_filename))
Expand Down

0 comments on commit 51ab2c7

Please sign in to comment.