diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 1456a01755..ff0bfd0dcd 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -586,7 +586,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
// failures, etc.
// -> ERROR : Use for any error, a simple page will be output
//
-function message_die($msg_code, $msg_text = '', $msg_title = '', $display_header = false)
+function message_die($msg_code, $msg_text = '', $msg_title = '')
{
global $db, $session, $acl, $template, $board_config, $theme, $lang, $userdata, $user_ip;
global $phpEx, $phpbb_root_path, $nav_links, $starttime;
@@ -594,31 +594,42 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $display_header
switch ( $msg_code )
{
case MESSAGE:
- if ( !$userdata )
+ if ( empty($lang) && !empty($board_config['default_lang']) )
{
- $userdata = $session->start();
- $acl = new auth('admin', $userdata);
- $session->configure($userdata);
- }
+ if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) )
+ {
+ $board_config['default_lang'] = 'english';
+ }
- if ( !defined('HEADER_INC') )
- {
- if ( !defined('IN_ADMIN') )
- {
- include($phpbb_root_path . 'includes/page_header.' . $phpEx);
- }
- else
- {
- page_header('', '', false);
- }
+ include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
}
$msg_title = ( $msg_title == '' ) ? $lang['Information'] : $msg_title;
$msg_text = ( !empty($lang[$msg_text]) ) ? $lang[$msg_text] : $msg_text;
+ if ( !defined('HEADER_INC') )
+ {
+ if ( empty($userdata) )
+ {
+ echo '
' . $msg_title . '' . "\n";
+ echo '' . $msg_title . ' |
---|
' . $msg_text . ' |
|