diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-13 16:02:30 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-13 16:02:30 +0000 |
commit | e3bd9660427c1cdfb5f906dbc34890ed6e2a5834 (patch) | |
tree | f435d6ade1f8742fb31d7cecac386dd7324d3a69 /phpBB/includes/error.php | |
parent | bdaedc9afc2dc1c40aecaf5fb7caa2212449dc9f (diff) | |
download | forums-e3bd9660427c1cdfb5f906dbc34890ed6e2a5834.tar forums-e3bd9660427c1cdfb5f906dbc34890ed6e2a5834.tar.gz forums-e3bd9660427c1cdfb5f906dbc34890ed6e2a5834.tar.bz2 forums-e3bd9660427c1cdfb5f906dbc34890ed6e2a5834.tar.xz forums-e3bd9660427c1cdfb5f906dbc34890ed6e2a5834.zip |
Initial SQL updates complete
git-svn-id: file:///svn/phpbb/trunk@281 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/error.php')
-rw-r--r-- | phpBB/includes/error.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/phpBB/includes/error.php b/phpBB/includes/error.php index 8d5a95c40b..b6d73fe275 100644 --- a/phpBB/includes/error.php +++ b/phpBB/includes/error.php @@ -24,9 +24,7 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") { - global $db, $template, $phpEx, $default_lang; - global $table_bgcolor, $color1; - global $starttime, $phpbbversion; + global $db, $template, $phpEx, $default_lang, $theme; if(!defined("HEADER_INC")) { @@ -42,6 +40,10 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") { $template = new Template("templates/Default"); } + if(!$theme) + { + $theme = setuptheme(1); + } include('includes/page_header.'.$phpEx); } if(!$error_msg) @@ -56,8 +58,7 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") break; case SQL_CONNECT: - $db_error = $db->sql_error(); - $error_msg .= "<br />SQL connect error - " . $db_error["message"]; + $error_msg = "Couldn't connect to database!"; break; case BANNED: @@ -65,8 +66,6 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") break; case SQL_QUERY: - $db_error = $db->sql_error(); - $error_msg .= "<br />SQL query error - ".$db_error["message"]; break; case SESSION_CREATE: @@ -88,8 +87,10 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") $error_msg .= "<br /><br /><u>DEBUG INFO</u></br /><br>Line: ".$line."<br />File: ".$file; } - $template->set_filenames(array("error_body" => "error_body.tpl")); - $template->assign_vars(array("ERROR_MESSAGE" => $error_msg)); + $template->set_filenames(array( + "error_body" => "error_body.tpl")); + $template->assign_vars(array( + "ERROR_MESSAGE" => $error_msg)); $template->pparse("error_body"); include('includes/page_tail.'.$phpEx); @@ -97,4 +98,4 @@ function error_die($error_code, $error_msg = "", $line = "", $file = "") exit(); } -?> +?>
\ No newline at end of file |