Changeset 6447
- Timestamp:
- 12/21/2007 02:53:57 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
wp-includes/functions.php (modified) (2 diffs)
-
wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r6402 r6447 1530 1530 } 1531 1531 1532 function dead_db() { 1533 global $wpdb; 1534 1535 // Load custom DB error template, if present. 1536 if ( file_exists( ABSPATH . 'wp-content/db-error.php' ) ) { 1537 require_once( ABSPATH . 'wp-content/db-error.php' ); 1538 die(); 1539 } 1540 1541 // If installing or in the admin, provide the verbose message. 1542 if ( defined('WP_INSTALLING') || defined('WP_ADMIN') ) 1543 wp_die($wpdb->error); 1544 1545 // Otherwise, be terse. 1546 status_header( 500 ); 1547 nocache_headers(); 1548 header( 'Content-Type: text/html; charset=utf-8' ); 1549 ?> 1550 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1551 <html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>> 1552 <head> 1553 <title>Database Error</title> 1554 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1555 </head> 1556 <body> 1557 <h1>Error establishing a database connection</h1> 1558 </body> 1559 </html> 1560 <?php 1561 die(); 1562 } 1532 1563 1533 1564 /** … … 1574 1605 return $url; 1575 1606 } 1607 1576 1608 ?> -
trunk/wp-settings.php
r6437 r6447 197 197 198 198 require_wp_db(); 199 200 if ( !empty($wpdb->error) ) 201 dead_db(); 202 199 203 $prefix = $wpdb->set_prefix($table_prefix); 200 204
Note: See TracChangeset
for help on using the changeset viewer.