diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-25 14:59:01 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-25 14:59:01 +0000 |
commit | 22b9be70a4404ac92a9858202afc8317cb97b007 (patch) | |
tree | 3fdb50428c6d0012c8a75b2763374a2a96bddcaf /phpBB/includes/functions.php | |
parent | f9dfbf20400a088e1c0bdb6e3e40606563821698 (diff) | |
download | forums-22b9be70a4404ac92a9858202afc8317cb97b007.tar forums-22b9be70a4404ac92a9858202afc8317cb97b007.tar.gz forums-22b9be70a4404ac92a9858202afc8317cb97b007.tar.bz2 forums-22b9be70a4404ac92a9858202afc8317cb97b007.tar.xz forums-22b9be70a4404ac92a9858202afc8317cb97b007.zip |
Failed to switch to English images default if prefered language doesn't exist ...
git-svn-id: file:///svn/phpbb/trunk@2212 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 190c481935..53d7a365ac 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -301,12 +301,11 @@ function setup_style($style) message_die(CRITICAL_ERROR, "Couldn't open $template_name template config file"); } - if ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) + $img_lang = ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english'; + + while( list($key, $value) = @each($images) ) { - while( list($key, $value) = @each($images) ) - { - $images[$key] = str_replace("{LANG}", 'lang_' . $board_config['default_lang'], $value); - } + $images[$key] = str_replace("{LANG}", 'lang_' . $img_lang, $value); } } |