mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Changes to include location + some other misc stuff
git-svn-id: file:///svn/phpbb/trunk@646 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -24,19 +24,23 @@
|
||||
switch($dbms)
|
||||
{
|
||||
case 'mysql':
|
||||
include('db/mysql.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/mysql.'.$phpEx);
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
include('db/postgres7.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/postgres7.'.$phpEx);
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
include('db/mssql.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/mssql.'.$phpEx);
|
||||
break;
|
||||
|
||||
case 'odbc':
|
||||
include('db/odbc.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/odbc.'.$phpEx);
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
include('db/oracle.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/oracle.'.$phpEx);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -24,27 +24,27 @@
|
||||
|
||||
function error_die($error_code, $error_msg = "", $line = "", $file = "")
|
||||
{
|
||||
global $db, $template, $phpEx, $default_lang, $theme;
|
||||
global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path;
|
||||
|
||||
if(!defined("HEADER_INC"))
|
||||
{
|
||||
if(!empty($default_lang))
|
||||
if(!empty($board_config['default_lang']))
|
||||
{
|
||||
include('language/lang_'.$default_lang.'.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include('language/lang_english.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
||||
}
|
||||
if(!$template)
|
||||
{
|
||||
$template = new Template("templates/Default");
|
||||
$template = new Template($phpbb_root_path . "templates/Default");
|
||||
}
|
||||
if(!$theme)
|
||||
{
|
||||
$theme = setuptheme(1);
|
||||
}
|
||||
include('includes/page_header.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
}
|
||||
if(!$error_msg)
|
||||
{
|
||||
@@ -55,13 +55,19 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "")
|
||||
{
|
||||
$error_msg = "An Error Occured";
|
||||
}
|
||||
if(!$message_title)
|
||||
{
|
||||
$message_title = "General Error";
|
||||
}
|
||||
break;
|
||||
|
||||
case SQL_CONNECT:
|
||||
$message_title = "General Error";
|
||||
$error_msg = "Couldn't connect to database!";
|
||||
break;
|
||||
|
||||
case BANNED:
|
||||
$message_title = $lang['Information'];
|
||||
$error_msg = "You have been banned from this forum.";
|
||||
break;
|
||||
|
||||
@@ -69,15 +75,18 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "")
|
||||
break;
|
||||
|
||||
case SESSION_CREATE:
|
||||
$error_msg = "Error creating session. Could not log you in. Please go back and try again.";
|
||||
$message_title = "General Error";
|
||||
$error_msg = "Error creating session<br>Could not log you in, please go back and try again.";
|
||||
break;
|
||||
|
||||
case NO_POSTS:
|
||||
$error_msg = "There are no posts in this forum. Click on the <b>Post New Topic</b> link on this page to post one.";
|
||||
$message_title = $lang['Information'];
|
||||
$error_msg = "There are no posts in this forum<br>Click on the <b>Post New Topic</b> link on this page to post one.";
|
||||
break;
|
||||
|
||||
case LOGIN_FAILED:
|
||||
$error_msg = "Login Failed. You have specified an incorrect/inactive username or invalid password, please go back and try again.";
|
||||
$message_title = $lang['Information'];
|
||||
$error_msg = "Login Failed<br>You have specified an incorrect/inactive username or invalid password, please go back and try again.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -88,12 +97,14 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "")
|
||||
}
|
||||
|
||||
$template->set_filenames(array(
|
||||
"error_body" => "error_body.tpl"));
|
||||
"message_body" => "error_body.tpl")
|
||||
);
|
||||
$template->assign_vars(array(
|
||||
"ERROR_MESSAGE" => $error_msg));
|
||||
$template->pparse("error_body");
|
||||
"ERROR_MESSAGE" => $error_msg)
|
||||
);
|
||||
$template->pparse("message_body");
|
||||
|
||||
include('includes/page_tail.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
|
||||
exit();
|
||||
}
|
||||
|
@@ -225,7 +225,7 @@ function make_forum_box($box_name, $default_forum = -1)
|
||||
// Initialise user settings on page load
|
||||
function init_userprefs($userdata)
|
||||
{
|
||||
global $board_config, $theme, $template, $lang, $phpEx;
|
||||
global $board_config, $theme, $template, $lang, $phpEx, $phpbb_root_path;
|
||||
|
||||
if(!$board_config['override_user_themes'])
|
||||
{
|
||||
@@ -270,15 +270,15 @@ function init_userprefs($userdata)
|
||||
}
|
||||
}
|
||||
|
||||
$template = new Template("templates/" . $board_config['default_template']);
|
||||
$template = new Template($phpbb_root_path . "templates/" . $board_config['default_template']);
|
||||
|
||||
if(file_exists("language/lang_".$board_config['default_lang'].".".$phpEx) )
|
||||
{
|
||||
include('language/lang_'.$board_config['default_lang'].'.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_'.$board_config['default_lang'].'.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include('language/lang_english.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@@ -47,7 +47,7 @@
|
||||
//
|
||||
function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", $err_file = "", $sql = "")
|
||||
{
|
||||
global $db, $template, $board_config, $theme, $lang, $phpEx;
|
||||
global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path;
|
||||
global $userdata, $user_ip, $session_length;
|
||||
global $starttime;
|
||||
|
||||
@@ -64,16 +64,16 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||
{
|
||||
if( !empty($board_config['default_lang']) )
|
||||
{
|
||||
include('language/lang_' . $board_config['default_lang'] . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include('language/lang_english.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
||||
}
|
||||
|
||||
if( empty($template) )
|
||||
{
|
||||
$template = new Template("templates/Default");
|
||||
$template = new Template($phpbb_root_path . "templates/Default");
|
||||
}
|
||||
|
||||
if( empty($theme) )
|
||||
@@ -84,7 +84,7 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||
//
|
||||
// Load the Page Header
|
||||
//
|
||||
include('includes/page_header.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
}
|
||||
|
||||
switch($msg_code)
|
||||
@@ -119,7 +119,7 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||
// Critical errors mean we cannot rely on _ANY_ DB information being
|
||||
// available so we're going to dump out a simple echo'd statement
|
||||
//
|
||||
include('language/lang_english.'.$phpEx);
|
||||
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
|
||||
|
||||
if($msg_text == "")
|
||||
{
|
||||
@@ -176,7 +176,7 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||
);
|
||||
$template->pparse("message_body");
|
||||
|
||||
include('includes/page_tail.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user