diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-01 20:19:42 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-01 20:19:42 +0000 |
commit | a07b69c13f01a2ee2f7ec166aac665313d319fe1 (patch) | |
tree | bc49082df959c0481f30ed7b0e0c842fd221c907 | |
parent | b2a8fb4a8f086e3c5900b00ed9fef5678e2cceeb (diff) | |
download | forums-a07b69c13f01a2ee2f7ec166aac665313d319fe1.tar forums-a07b69c13f01a2ee2f7ec166aac665313d319fe1.tar.gz forums-a07b69c13f01a2ee2f7ec166aac665313d319fe1.tar.bz2 forums-a07b69c13f01a2ee2f7ec166aac665313d319fe1.tar.xz forums-a07b69c13f01a2ee2f7ec166aac665313d319fe1.zip |
Some mods to allow for default config information useage for CRITICAL MESSAGES
git-svn-id: file:///svn/phpbb/trunk@783 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/message.php | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/phpBB/includes/message.php b/phpBB/includes/message.php index 9cacc5a786..32a64af6cf 100644 --- a/phpBB/includes/message.php +++ b/phpBB/includes/message.php @@ -38,12 +38,14 @@ // // CRITICAL_MESSAGE -> Only currently used to announce a user // has been banned, can be used where session results cannot -// be relied upon to exist +// be relied upon to exist but we can and do assume that basic +// board configuration data is available // // CRITICAL_ERROR -> Used whenever a DB connection cannot be -// guaranteed and/or sessions have failed. Shouldn't be used -// in general pages/functions (it results in a simple echo'd -// statement, no templates are used) +// guaranteed and/or we've been unable to obtain basic board +// configuration data. Shouldn't be used in general +// pages/functions (it results in a simple echo'd statement, +// no templates are used) // function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", $err_file = "", $sql = "") { @@ -64,23 +66,26 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", // if( !defined("HEADER_INC") && $msg_code != CRITICAL_ERROR ) { - if( !empty($board_config['default_lang']) ) + if( empty($lang) ) { - include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '.'.$phpEx); - } - else - { - include($phpbb_root_path . 'language/lang_english.'.$phpEx); + if( !empty($board_config['default_lang']) ) + { + include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '.'.$phpEx); + } + else + { + include($phpbb_root_path . 'language/lang_english.'.$phpEx); + } } if( empty($template) ) { - $template = new Template($phpbb_root_path . "templates/Default"); + $template = new Template($phpbb_root_path . "templates/" . $board_config['default_template']); } if( empty($theme) ) { - $theme = setuptheme(1); + $theme = setuptheme($board_config['default_theme']); } // |