Ticket #11804: 11804.patch
File 11804.patch, 1.6 KB (added by , 15 years ago) |
---|
-
wp-admin/maint/repair.php
31 31 32 32 $okay = true; 33 33 34 // Loop over the WP tables, checking and repairing as needed. 35 foreach ($wpdb->tables as $table) { 36 if ( in_array($table, $wpdb->old_tables) ) 37 continue; 34 // Loop over the WP tables, checking and repairing as needed. 35 foreach ($wpdb->get_tables() as $table) { 38 36 39 37 $check = $wpdb->get_row("CHECK TABLE {$wpdb->prefix}$table"); 40 38 if ( 'OK' == $check->Msg_text ) { -
wp-includes/wp-db.php
1129 1129 function db_version() { 1130 1130 return preg_replace('/[^0-9.].*/', '', mysql_get_server_info( $this->dbh )); 1131 1131 } 1132 1133 /** 1134 * get tables 1135 * 1136 * get list of a set of tables 1137 * 1138 * Sets: 1139 * 1140 * all : all names 1141 * current : active tables 1142 * old : deprecated tables 1143 * 1144 * 1145 * @param string $set (optional) 'all', 'current' or 'old'. defaults to 'current' 1146 * @return array list of old table names (w/o prefix), false on error 1147 */ 1148 function get_tables( $set = 'current' ) { 1149 $tables = false; 1150 1151 switch ( $set ) { 1152 case 'all': 1153 $tables = $this->tables; 1154 break; 1155 case 'current': 1156 $tables = array_diff( $this->tables, $this->old_tables ); 1157 break; 1158 case 'old': 1159 $tables = $this->old_tables; 1160 break; 1161 } 1162 1163 return $tables; 1164 } 1132 1165 } 1133 1166 1134 1167 if ( ! isset($wpdb) ) {