Make WordPress Core

Ticket #1587: ticket-1587-patch.diff

File ticket-1587-patch.diff, 1.9 KB (added by MikeLittle, 19 years ago)

Patch to implement this change

  • wp-includes/version.php

     
    33// This just holds the version number, in a separate file so we can bump it without cluttering the SVN
    44
    55$wp_version = '1.6-ALPHA-2-still-dont-use';
    6 $wp_db_version = 2966;
     6$wp_db_version = 3022;
    77
    88?>
     9 No newline at end of file
  • wp-admin/upgrade-functions.php

     
    3333        if ( $wp_current_db_version < 2966 )
    3434                upgrade_160();
    3535
     36        if ( $wp_current_db_version < 3022 )
     37                upgrade_3022();
     38
    3639        save_mod_rewrite_rules();
    3740       
    38         update_option('db_version', $wp_db_version);
     41    update_option('db_version', $wp_db_version);
    3942}
    4043
    4144function upgrade_100() {
     
    302305        }
    303306}
    304307
     308function upgrade_3022() {
     309        global $wpdb;
     310    // update link categories table to use enums
     311    $wpdb->query("ALTER TABLE $wpdb->linkcategories MODIFY COLUMN sort_order ENUM('id','name','rand','rating','updated','url') DEFAULT 'rand'");
     312}
     313   
    305314// The functions we use to actually do stuff
    306315
    307316// General
  • wp-admin/upgrade-schema.php

     
    3939  show_description enum('Y','N') NOT NULL default 'N',
    4040  show_rating enum('Y','N') NOT NULL default 'Y',
    4141  show_updated enum('Y','N') NOT NULL default 'Y',
    42   sort_order varchar(64) NOT NULL default 'rand',
     42  sort_order enum('id','rand','name','url','rating','updated') default 'rand',
    4343  sort_desc enum('Y','N') NOT NULL default 'N',
    4444  text_before_link varchar(128) NOT NULL default '<li>',
    4545  text_after_link varchar(128) NOT NULL default '<br />',