Changeset 19760 for trunk/wp-includes/wp-db.php
- Timestamp:
- 01/26/2012 08:34:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r19712 r19760 574 574 575 575 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 576 return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);576 return new WP_Error('invalid_db_prefix', 'Invalid database prefix' ); 577 577 578 578 $old_prefix = is_multisite() ? '' : $prefix; … … 746 746 if ( !@mysql_select_db( $db, $dbh ) ) { 747 747 $this->ready = false; 748 $this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'<h1>Can’t select database</h1> 748 wp_load_translations_early(); 749 $this->bail( sprintf( __( '<h1>Can’t select database</h1> 749 750 <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> 750 751 <ul> … … 753 754 <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> 754 755 </ul> 755 <p>If you don\'t know how to set up 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' );756 <p>If you don\'t know how to set up 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>' ), $db, $this->dbuser ), 'db_select_fail' ); 756 757 return; 757 758 } … … 924 925 return false; 925 926 927 wp_load_translations_early(); 928 926 929 if ( $caller = $this->get_caller() ) 927 $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 );930 $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller ); 928 931 else 929 $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 );932 $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query ); 930 933 931 934 if ( function_exists( 'error_log' ) … … 1038 1041 1039 1042 if ( !$this->dbh ) { 1040 $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 1043 wp_load_translations_early(); 1044 $this->bail( sprintf( __( " 1041 1045 <h1>Error establishing a database connection</h1> 1042 1046 <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> … … 1047 1051 </ul> 1048 1052 <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> 1049 " /*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );1053 " ), $this->dbhost ), 'db_connect_fail' ); 1050 1054 1051 1055 return; … … 1074 1078 1075 1079 // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method 1076 if ( function_exists( 'apply_filters' ) ) 1077 $query = apply_filters( 'query', $query ); 1080 $query = apply_filters( 'query', $query ); 1078 1081 1079 1082 $return_val = 0; … … 1327 1330 return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null; 1328 1331 } else { 1329 $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*/);1332 $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" ); 1330 1333 } 1331 1334 }
Note: See TracChangeset
for help on using the changeset viewer.