Changeset 11865 for trunk/wp-includes/wp-db.php
- Timestamp:
- 08/21/2009 05:00:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r11013 r11865 297 297 298 298 /** 299 * Database Username 300 * 301 * @since 2.9.0 302 * @access private 303 * @var string 304 */ 305 var $dbuser; 306 307 /** 299 308 * Connects to the database server and selects a database 300 309 * … … 338 347 if ( defined('DB_COLLATE') ) 339 348 $this->collate = DB_COLLATE; 349 350 $this->dbuser = $dbuser; 340 351 341 352 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); … … 350 361 </ul> 351 362 <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> 352 "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost) );363 "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost), 'db_connect_fail'); 353 364 return; 354 365 } … … 437 448 <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li> 438 449 </ul> 439 <p>If you don\'t know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, DB_USER));450 <p>If you don\'t know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser), 'db_select_fail'); 440 451 return; 441 452 } … … 997 1008 * @since 1.5.0 998 1009 * 999 * @param string $message 1010 * @param string $message The Error message 1011 * @param string $error_code (optional) A Computer readable string to identify the error. 1000 1012 * @return false|void 1001 1013 */ 1002 function bail($message ) {1014 function bail($message, $error_code = '500') { 1003 1015 if ( !$this->show_errors ) { 1004 1016 if ( class_exists('WP_Error') ) 1005 $this->error = new WP_Error( '500', $message);1017 $this->error = new WP_Error($error_code, $message); 1006 1018 else 1007 1019 $this->error = $message; … … 1036 1048 * @return bool True if collation is supported, false if version does not 1037 1049 */ 1038 function supports_collation() 1039 { 1050 function supports_collation() { 1040 1051 return $this->has_cap( 'collation' ); 1041 1052 }
Note: See TracChangeset
for help on using the changeset viewer.