wp_die() improvements from Sewar. fixes #2902

git-svn-id: https://develop.svn.wordpress.org/trunk@4006 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-07-10 05:29:10 +00:00
parent 87236e55fd
commit 4591c517ce
11 changed files with 64 additions and 122 deletions

View File

@@ -303,59 +303,10 @@ class wpdb {
}
function bail($message) { // Just wraps errors in a nice header and footer
if ( !$this->show_errors )
return false;
header( 'Content-Type: text/html; charset=utf-8');
echo <<<HEAD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &rsaquo; Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style media="screen" type="text/css">
<!--
html {
background: #eee;
}
body {
background: #fff;
color: #000;
font-family: Georgia, "Times New Roman", Times, serif;
margin-left: 25%;
margin-right: 25%;
padding: .2em 2em;
}
if ( !$this->show_errors )
return false;
h1 {
color: #006;
font-size: 18px;
font-weight: lighter;
}
h2 {
font-size: 16px;
}
p, li, dt {
line-height: 140%;
padding-bottom: 2px;
}
ul, ol {
padding: 5px 5px 5px 20px;
}
#logo {
margin-bottom: 2em;
}
-->
</style>
</head>
<body>
<h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1>
HEAD;
echo $message;
echo "</body></html>";
die();
wp_die($message);
}
}