mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-13 14:58:52 +00:00
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
This commit is contained in:
parent
b2a8fb4a8f
commit
a07b69c13f
1 changed files with 17 additions and 12 deletions
|
@ -38,12 +38,14 @@
|
||||||
//
|
//
|
||||||
// CRITICAL_MESSAGE -> Only currently used to announce a user
|
// CRITICAL_MESSAGE -> Only currently used to announce a user
|
||||||
// has been banned, can be used where session results cannot
|
// 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
|
// CRITICAL_ERROR -> Used whenever a DB connection cannot be
|
||||||
// guaranteed and/or sessions have failed. Shouldn't be used
|
// guaranteed and/or we've been unable to obtain basic board
|
||||||
// in general pages/functions (it results in a simple echo'd
|
// configuration data. Shouldn't be used in general
|
||||||
// statement, no templates are used)
|
// 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 = "")
|
function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", $err_file = "", $sql = "")
|
||||||
{
|
{
|
||||||
|
@ -63,6 +65,8 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||||
// If the header hasn't been output then do it
|
// If the header hasn't been output then do it
|
||||||
//
|
//
|
||||||
if( !defined("HEADER_INC") && $msg_code != CRITICAL_ERROR )
|
if( !defined("HEADER_INC") && $msg_code != CRITICAL_ERROR )
|
||||||
|
{
|
||||||
|
if( empty($lang) )
|
||||||
{
|
{
|
||||||
if( !empty($board_config['default_lang']) )
|
if( !empty($board_config['default_lang']) )
|
||||||
{
|
{
|
||||||
|
@ -72,15 +76,16 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( empty($template) )
|
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) )
|
if( empty($theme) )
|
||||||
{
|
{
|
||||||
$theme = setuptheme(1);
|
$theme = setuptheme($board_config['default_theme']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue