mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Upgrade fixes. see #4189
git-svn-id: http://svn.automattic.com/wordpress/trunk@5643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16e8f842f5
commit
b8c0875ef0
@ -607,22 +607,29 @@ function upgrade_230() {
|
||||
|
||||
$wpdb->query("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES ('$term_id', '$name', '$slug', '$term_group')");
|
||||
|
||||
$count = 0;
|
||||
if ( !empty($category->category_count) ) {
|
||||
$count = (int) $category->category_count;
|
||||
$taxonomy = 'category';
|
||||
$wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
|
||||
$tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
|
||||
} else if ( !empty($category->link_count) ) {
|
||||
}
|
||||
|
||||
if ( !empty($category->link_count) ) {
|
||||
$count = (int) $category->link_count;
|
||||
$taxonomy = 'link_category';
|
||||
$wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
|
||||
$tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
|
||||
} else if ( !empty($category->tag_count) ) {
|
||||
}
|
||||
|
||||
if ( !empty($category->tag_count) ) {
|
||||
$count = (int) $category->tag_count;
|
||||
$taxonomy = 'post_tag';
|
||||
$wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
|
||||
$tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
|
||||
} else {
|
||||
}
|
||||
|
||||
if ( empty($count) ) {
|
||||
$count = 0;
|
||||
$taxonomy = 'category';
|
||||
$wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')");
|
||||
|
Loading…
Reference in New Issue
Block a user