Make WordPress Core

Changeset 5643


Ignore:
Timestamp:
06/03/2007 06:57:14 PM (19 years ago)
Author:
ryan
Message:

Upgrade fixes. see #4189

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r5621 r5643  
    608608                $wpdb->query("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES ('$term_id', '$name', '$slug', '$term_group')");
    609609
     610                $count = 0;
    610611                if ( !empty($category->category_count) ) {
    611612                        $count = (int) $category->category_count;
     
    613614                        $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
    614615                        $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
    615                 } else if ( !empty($category->link_count) ) {
     616                }
     617
     618                if ( !empty($category->link_count) ) {
    616619                        $count = (int) $category->link_count;
    617620                        $taxonomy = 'link_category';
    618621                        $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
    619622                        $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
    620                 } else if ( !empty($category->tag_count) ) {
     623                }
     624
     625                if ( !empty($category->tag_count) ) {
    621626                        $count = (int) $category->tag_count;
    622627                        $taxonomy = 'post_tag';
    623628                        $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
    624629                        $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
    625                 } else {
     630                }
     631               
     632                if ( empty($count) ) {
    626633                        $count = 0;
    627634                        $taxonomy = 'category';
Note: See TracChangeset for help on using the changeset viewer.