Changeset 1061

Show
Ignore:
Timestamp:
10/04/07 12:01:10 (1 year ago)
Author:
donncha
Message:

We only want to sync after the db has been upgraded

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-content/mu-plugins/sync-taxonomy.php

    r1060 r1061  
    2828function sync_link2cat( $link_id ) { 
    2929        global $wpdb; 
     30 
     31        if ( get_option('db_version') != 6124 ) 
     32                return; 
    3033         
    3134        if( function_exists( 'get_term' ) ) { 
     
    6770        global $wpdb; 
    6871 
     72        if ( get_option('db_version') != 6124 ) 
     73                return; 
     74         
    6975        if( function_exists( 'get_term' ) ) { 
    7076                $wpdb->query( "DELETE FROM {$wpdb->post2cat} WHERE post_id = '{$post_id}'" ); 
     
    111117        global $wpdb; 
    112118 
     119        if ( get_option('db_version') != 6124 ) 
     120                return; 
     121         
    113122        if( function_exists( 'get_term' ) ) { 
    114123                $cat = $wpdb->get_row( "SELECT * FROM {$wpdb->terms}, {$wpdb->term_taxonomy} WHERE {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id AND {$wpdb->term_taxonomy}.term_id = '$cat_ID'" ); 
     
    131140        global $wpdb; 
    132141 
     142        if ( get_option('db_version') != 6124 ) 
     143                return; 
     144         
    133145        if( strpos( $_SERVER[ 'HTTP_REFERER' ], 'link-add.php' ) ) { 
    134146                $taxonomy = 'link_category'; 
     
    157169        global $wpdb; 
    158170 
     171        if ( get_option('db_version') != 6124 ) 
     172                return; 
     173         
    159174        if( function_exists( 'get_term' ) ) { 
    160175                $wpdb->query( "DELETE FROM {$wpdb->categories} WHERE cat_ID = '$cat_ID'" ); 
     
    300315        global $wpdb; 
    301316 
     317        if ( get_option('db_version') != 6124 ) 
     318                return; 
     319         
    302320        if( $global_id == $cat_ID ) 
    303321                return; 
     
    312330        global $wpdb, $blog_id; 
    313331 
     332        if ( get_option('db_version') != 6124 ) 
     333                return; 
     334         
    314335        $upgradetaxonomysecret = get_taxonomy_secret(); 
    315336