Changes from trunk/wp-admin/includes/upgrade.php at r6158 to branches/2.3/wp-admin/includes/upgrade.php at r6268
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/wp-admin/includes/upgrade.php
r6158 r6268 534 534 // Convert categories to terms. 535 535 $tt_ids = array(); 536 $have_tags = false; 536 537 $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID"); 537 538 foreach ($categories as $category) { … … 580 581 581 582 if ( !empty($category->tag_count) ) { 583 $have_tags = true; 582 584 $count = (int) $category->tag_count; 583 585 $taxonomy = 'post_tag'; … … 594 596 } 595 597 596 $posts = $wpdb->get_results("SELECT * FROM $wpdb->post2cat"); 598 $select = 'post_id, category_id'; 599 if ( $have_tags ) 600 $select .= ', rel_type'; 601 602 $posts = $wpdb->get_results("SELECT $select FROM $wpdb->post2cat GROUP BY post_id, category_id"); 597 603 foreach ( $posts as $post ) { 598 604 $post_id = (int) $post->post_id; … … 659 665 update_option('default_link_category', $default_link_cat); 660 666 } else { 661 $links = $wpdb->get_results("SELECT * FROM $wpdb->link2cat");667 $links = $wpdb->get_results("SELECT link_id, category_id FROM $wpdb->link2cat GROUP BY link_id, category_id"); 662 668 foreach ( $links as $link ) { 663 669 $link_id = (int) $link->link_id; … … 1003 1009 // Add the column list to the index create string 1004 1010 $index_string .= ' ('.$index_columns.')'; 1005 error_log("Index string: $index_string", 0);1006 1011 if(!(($aindex = array_search($index_string, $indices)) === false)) { 1007 1012 unset($indices[$aindex]);
Note: See TracChangeset
for help on using the changeset viewer.