Changeset 8168 for trunk/wp-includes/wp-db.php
- Timestamp:
- 06/23/2008 03:40:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r8164 r8168 318 318 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); 319 319 if (!$this->dbh) { 320 $this->bail( "320 $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/" 321 321 <h1>Error establishing a database connection</h1> 322 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code> $dbhost</code>. This could mean your host's database server is down.</p>322 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p> 323 323 <ul> 324 324 <li>Are you sure you have the correct username and password?</li> … … 327 327 </ul> 328 328 <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> 329 " );329 "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost)); 330 330 return; 331 331 } … … 374 374 375 375 if ( preg_match('|[^a-z0-9_]|i', $prefix) ) 376 return new WP_Error('invalid_db_prefix', 'Invalid database prefix'); // No gettext here376 return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/); 377 377 378 378 $old_prefix = $this->prefix; … … 405 405 if (!@mysql_select_db($db, $this->dbh)) { 406 406 $this->ready = false; 407 $this->bail( "407 $this->bail(sprintf(/*WP_I18N_DB_SELECT_DB*/' 408 408 <h1>Can’t select database</h1> 409 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code> $db</code> database.</p>409 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p> 410 410 <ul> 411 411 <li>Are you sure it exists?</li> 412 <li>Does the user <code> ".DB_USER."</code> have permission to use the <code>$db</code> database?</li>412 <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li> 413 413 <li>On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?</li> 414 414 </ul> 415 <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>");415 <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)); 416 416 return; 417 417 } … … 488 488 return false; 489 489 490 $error_str = "WordPress database error $str for query $this->last_query";491 490 if ( $caller = $this->get_caller() ) 492 $error_str .= " made by $caller"; 491 $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller); 492 else 493 $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query); 493 494 494 495 $log_error = true; … … 746 747 return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null; 747 748 } else { 748 $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N");749 $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/); 749 750 } 750 751 }
Note: See TracChangeset
for help on using the changeset viewer.