Skip to:
Content

Changeset 1638


Ignore:
Timestamp:
08/11/08 19:41:00 (6 years ago)
Author:
mdawaffe
Message:

topic indices: replace forum_stickies (topic_status, forum_id, topic_sticky, topic_time) with stickies (topic_status, topic_sticky, topic_time)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-admin/upgrade-functions.php

    r1631 r1638  
    4141    $bb_upgrade['messages'][] = bb_upgrade_1080(); // Convert tags to taxonomy 
    4242    $bb_upgrade['messages'][] = bb_upgrade_1090(); // Add display names 
     43    $bb_upgrade['messages'][] = bb_upgrade_1100(); // Replace forum_stickies index with stickies (#876) 
    4344 
    4445    bb_update_db_version(); 
     
    922923} 
    923924 
     925function bb_upgrade_1100() { 
     926    if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 1638 ) 
     927        return; 
     928 
     929    global $bbdb; 
     930 
     931    $bbdb->query( "DROP INDEX forum_stickies ON $bbdb->topics" ); 
     932 
     933    bb_update_option( 'bb_db_version', 1638 ); 
     934 
     935    return 'Index forum_stickies dropped: ' . __FUNCTION__; 
     936} 
     937 
    924938function bb_deslash($content) { 
    925939    // Note: \\\ inside a regex denotes a single backslash. 
  • trunk/bb-admin/upgrade-schema.php

    r1633 r1638  
    133133    KEY `forum_time` (`forum_id`, `topic_time`), 
    134134    KEY `user_start_time` (`topic_poster`, `topic_start_time`), 
    135     KEY `forum_stickies` (`topic_status`, `forum_id`, `topic_sticky`, `topic_time`) 
     135    KEY `stickies` (`topic_status`, `topic_sticky`, `topic_time`) 
    136136);"; 
    137137 
  • trunk/bb-includes/functions.php

    r1635 r1638  
    16751675        break; 
    16761676    case 'bb_db_version' : 
    1677         return '1605'; // Don't filter 
     1677        return '1638'; // Don't filter 
    16781678        break; 
    16791679    case 'html_type' : 
Note: See TracChangeset for help on using the changeset viewer.