Make WordPress Core


Ignore:
Timestamp:
02/03/2010 01:00:57 AM (16 years ago)
Author:
wpmuguru
Message:

fix potential global terms inconsistency, props rboren, see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r12932 r12933  
    14201420    $wpdb->update( $wpdb->options, array('option_value' => ''), array('option_name' => 'admin_email') );
    14211421
    1422     // Default category
    1423     $wpdb->insert( $wpdb->terms, array('term_id' => 1, 'name' => __('Uncategorized'), 'slug' => sanitize_title(__('Uncategorized')), 'term_group' => 0) );
    1424     $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => 1, 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1) );
    1425 
    1426     // Default link category
    1427     $cat_name = __('Blogroll');
    1428     $cat_slug = sanitize_title($cat_name);
    1429 
    1430     $blogroll_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
    1431 
    1432     if ( $blogroll_id == null ) {
    1433         $wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) );
    1434         $blogroll_id = $wpdb->insert_id;
    1435     }
    1436     $wpdb->insert( $wpdb->terms, array('term_id' => $blogroll_id, 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) );
    1437     $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $blogroll_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 2) );
    1438     update_option('default_link_category', $blogroll_id);
    1439 
    14401422    // remove all perms
    14411423    $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE meta_key = %s", $table_prefix.'user_level') );
Note: See TracChangeset for help on using the changeset viewer.