From a07b69c13f01a2ee2f7ec166aac665313d319fe1 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 1 Aug 2001 20:19:42 +0000 Subject: [PATCH] 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 --- phpBB/includes/message.php | 29 +++++++++++++++++------------ 1 file 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']); } //