Ticket #2409: 2409.diff
File 2409.diff, 3.0 KB (added by , 19 years ago) |
---|
-
wp-includes/wp-db.php
305 305 function bail($message) { // Just wraps errors in a nice header and footer 306 306 if ( !$this->show_errors ) 307 307 return false; 308 status_header(503); 308 309 header( 'Content-Type: text/html; charset=utf-8'); 310 309 311 echo <<<HEAD 310 312 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 311 313 <html xmlns="http://www.w3.org/1999/xhtml"> … … 360 362 } 361 363 362 364 $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); 363 ?> 364 No newline at end of file 365 ?> -
wp-includes/functions.php
2286 2286 $wp->main($query_vars); 2287 2287 } 2288 2288 2289 function status_header( $header ) { 2290 if ( 200 == $header ) 2291 $text = 'OK'; 2292 elseif ( 301 == $header ) 2293 $text = 'Moved Permanently'; 2294 elseif ( 302 == $header ) 2295 $text = 'Moved Temporarily'; 2296 elseif ( 304 == $header ) 2297 $text = 'Not Modified'; 2298 elseif ( 404 == $header ) 2299 $text = 'Not Found'; 2300 elseif ( 410 == $header ) 2301 $text = 'Gone'; 2289 function header_num_to_desc($num) { 2290 global $http_resp_codes; 2291 return $http_resp_codes[$header]; 2292 } 2302 2293 2294 function status_header( $header, $text='' ) { 2295 if ( '' == $text) { 2296 $text = header_num_to_desc($header); 2297 } 2303 2298 @header("HTTP/1.1 $header $text"); 2304 2299 @header("Status: $header $text"); 2305 2300 } -
wp-includes/vars.php
110 110 $wp_smiliesreplace[] = " <img src='" . get_settings('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> "; 111 111 } 112 112 113 $http_resp_codes = array ( 114 100 => "Continue", 115 101 => "Switching Protocols", 116 200 => "OK", 117 201 => "Created", 118 202 => "Accepted", 119 203 => "Non-Authoritative Information", 120 204 => "No Content", 121 205 => "Reset Content", 122 206 => "Partial Content", 123 300 => "Multiple Choices", 124 301 => "Moved Permanently", 125 302 => "Found", 126 303 => "See Other", 127 304 => "Not Modified", 128 305 => "Use Proxy", 129 307 => "Temporary Redirect", 130 400 => "Bad Request", 131 401 => "Unauthorized", 132 403 => "Forbidden", 133 404 => "Not Found", 134 405 => "Method Not Allowed", 135 406 => "Not Acceptable", 136 407 => "Proxy Authentication Required", 137 408 => "Request Timeout", 138 409 => "Conflict", 139 410 => "Gone", 140 411 => "Length Required", 141 412 => "Precondition Failed", 142 413 => "Request Entity Too Large", 143 414 => "Request-URI Too Long", 144 415 => "Unsupported Media Type", 145 416 => "Requested Range Not Satisfiable", 146 417 => "Expectation Failed", 147 500 => "Internal Server Error", 148 501 => "Not Implemented", 149 502 => "Bad Gateway", 150 503 => "Service Unavailable", 151 504 => "Gateway Timeout", 152 505 => "HTTP Version Not Supported" 153 ); 154 113 155 ?>