Skip to:
Content

bbPress.org

Changeset 5427


Ignore:
Timestamp:
07/07/2014 02:43:19 PM (11 years ago)
Author:
netweb
Message:

Fixed topic sticky status importing method for compatibility when wp_bbconverter_translator database sync_table exists.

  • Topic stickies and super stickies are correctly stuck with or without sync_table
  • Renamed sticky meta key _bbp_old_sticky_status to _bbp_old_sticky_status_id for importers that support stickies

See #2650

Location:
trunk/src/includes/admin
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/converter.php

    r5425 r5427  
    10941094
    10951095        if ( !empty( $this->sync_table ) ) {
    1096             $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1096            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    10971097        } else {
    1098             $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1098            $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta  . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    10991099        }
    11001100
     
    11251125
    11261126        if ( !empty( $this->sync_table ) ) {
    1127             $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1127            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    11281128        } else {
    1129             $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1129            $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta  . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    11301130        }
    11311131
  • trunk/src/includes/admin/converters/AEF.php

    r5426 r5427  
    240240        );
    241241
    242         // Sticky status (Stored in postmeta))
     242        // Sticky status (Stored in postmeta)
    243243        $this->field_map[] = array(
    244244            'from_tablename'  => 'topics',
    245245            'from_fieldname'  => 't_sticky',
    246246            'to_type'         => 'topic',
    247             'to_fieldname'    => '_bbp_old_sticky_status',
     247            'to_fieldname'    => '_bbp_old_sticky_status_id',
    248248            'callback_method' => 'callback_sticky_status'
    249249        );
  • trunk/src/includes/admin/converters/Drupal7.php

    r5426 r5427  
    191191        );
    192192
    193         // Sticky status (Stored in postmeta))
     193        // Sticky status (Stored in postmeta)
    194194        $this->field_map[] = array(
    195195            'from_tablename'  => 'forum_index',
    196196            'from_fieldname'  => 'sticky',
    197197            'to_type'         => 'topic',
    198             'to_fieldname'    => '_bbp_old_sticky_status',
     198            'to_fieldname'    => '_bbp_old_sticky_status_id',
    199199            'callback_method' => 'callback_sticky_status'
    200200        );
  • trunk/src/includes/admin/converters/Example.php

    r5426 r5427  
    261261        );
    262262
    263         // Sticky status (Stored in postmeta))
     263        // Sticky status (Stored in postmeta)
    264264        $this->field_map[] = array(
    265265            'from_tablename'  => 'topics_table',
    266266            'from_fieldname'  => 'the_topic_sticky_status',
    267267            'to_type'         => 'topic',
    268             'to_fieldname'    => '_bbp_old_sticky_status',
     268            'to_fieldname'    => '_bbp_old_sticky_status_id',
    269269            'callback_method' => 'callback_sticky_status'
    270270        );
  • trunk/src/includes/admin/converters/FluxBB.php

    r5426 r5427  
    223223        );
    224224
    225         // Sticky status (Stored in postmeta))
     225        // Sticky status (Stored in postmeta)
    226226        $this->field_map[] = array(
    227227            'from_tablename'  => 'topics',
    228228            'from_fieldname'  => 'sticky',
    229229            'to_type'         => 'topic',
    230             'to_fieldname'    => '_bbp_old_sticky_status',
     230            'to_fieldname'    => '_bbp_old_sticky_status_id',
    231231            'callback_method' => 'callback_sticky_status'
    232232        );
  • trunk/src/includes/admin/converters/Invision.php

    r5349 r5427  
    215215        );
    216216
    217         // Sticky status (Stored in postmeta))
     217        // Sticky status (Stored in postmeta)
    218218        $this->field_map[] = array(
    219219            'from_tablename'  => 'topics',
    220220            'from_fieldname'  => 'pinned',
    221221            'to_type'         => 'topic',
    222             'to_fieldname'    => '_bbp_old_sticky_status',
     222            'to_fieldname'    => '_bbp_old_sticky_status_id',
    223223            'callback_method' => 'callback_sticky_status'
    224224        );
  • trunk/src/includes/admin/converters/Mingle.php

    r5426 r5427  
    163163        );
    164164
    165         // Sticky status (Stored in postmeta))
     165        // Sticky status (Stored in postmeta)
    166166        $this->field_map[] = array(
    167167            'from_tablename'  => 'forum_threads',
    168168            'from_fieldname'  => 'status',
    169169            'to_type'         => 'topic',
    170             'to_fieldname'    => '_bbp_old_sticky_status',
     170            'to_fieldname'    => '_bbp_old_sticky_status_id',
    171171            'callback_method' => 'callback_sticky_status'
    172172        );
  • trunk/src/includes/admin/converters/MyBB.php

    r5426 r5427  
    210210        );
    211211
    212         // Sticky status (Stored in postmeta))
     212        // Sticky status (Stored in postmeta)
    213213        $this->field_map[] = array(
    214214            'from_tablename'  => 'threads',
    215215            'from_fieldname'  => 'sticky',
    216216            'to_type'         => 'topic',
    217             'to_fieldname'    => '_bbp_old_sticky_status',
     217            'to_fieldname'    => '_bbp_old_sticky_status_id',
    218218            'callback_method' => 'callback_sticky_status'
    219219        );
  • trunk/src/includes/admin/converters/PHPFox3.php

    r5426 r5427  
    243243        );
    244244
    245         // Sticky status (Stored in postmeta))
     245        // Sticky status (Stored in postmeta)
    246246        $this->field_map[] = array(
    247247            'from_tablename'  => 'forum_thread',
    248248            'from_fieldname'  => 'order_id',
    249249            'to_type'         => 'topic',
    250             'to_fieldname'    => '_bbp_old_sticky_status',
     250            'to_fieldname'    => '_bbp_old_sticky_status_id',
    251251            'callback_method' => 'callback_sticky_status'
    252252        );
  • trunk/src/includes/admin/converters/PunBB.php

    r5426 r5427  
    232232        );
    233233
    234         // Sticky status (Stored in postmeta))
     234        // Sticky status (Stored in postmeta)
    235235        $this->field_map[] = array(
    236236            'from_tablename'  => 'topics',
    237237            'from_fieldname'  => 'sticky',
    238238            'to_type'         => 'topic',
    239             'to_fieldname'    => '_bbp_old_sticky_status',
     239            'to_fieldname'    => '_bbp_old_sticky_status_id',
    240240            'callback_method' => 'callback_sticky_status'
    241241        );
  • trunk/src/includes/admin/converters/SMF.php

    r5426 r5427  
    241241        );
    242242
    243         // Sticky status (Stored in postmeta))
     243        // Sticky status (Stored in postmeta)
    244244        $this->field_map[] = array(
    245245            'from_tablename'  => 'topics',
    246246            'from_fieldname'  => 'is_sticky',
    247247            'to_type'         => 'topic',
    248             'to_fieldname'    => '_bbp_old_sticky_status',
     248            'to_fieldname'    => '_bbp_old_sticky_status_id',
    249249            'callback_method' => 'callback_sticky_status'
    250250        );
  • trunk/src/includes/admin/converters/SimplePress5.php

    r5426 r5427  
    215215        );
    216216
    217         // Sticky status (Stored in postmeta))
     217        // Sticky status (Stored in postmeta)
    218218        $this->field_map[] = array(
    219219            'from_tablename'  => 'sftopics',
    220220            'from_fieldname'  => 'topic_pinned',
    221221            'to_type'         => 'topic',
    222             'to_fieldname'    => '_bbp_old_sticky_status',
     222            'to_fieldname'    => '_bbp_old_sticky_status_id',
    223223            'callback_method' => 'callback_sticky_status'
    224224        );
  • trunk/src/includes/admin/converters/XMB.php

    r5426 r5427  
    249249        );
    250250
    251         // Sticky status (Stored in postmeta))
     251        // Sticky status (Stored in postmeta)
    252252        $this->field_map[] = array(
    253253            'from_tablename'  => 'threads',
    254254            'from_fieldname'  => 'topped',
    255255            'to_type'         => 'topic',
    256             'to_fieldname'    => '_bbp_old_sticky_status',
     256            'to_fieldname'    => '_bbp_old_sticky_status_id',
    257257            'callback_method' => 'callback_sticky_status'
    258258        );
  • trunk/src/includes/admin/converters/XenForo.php

    r5426 r5427  
    263263        );
    264264
    265         // Sticky status (Stored in postmeta))
     265        // Sticky status (Stored in postmeta)
    266266        $this->field_map[] = array(
    267267            'from_tablename'  => 'thread',
    268268            'from_fieldname'  => 'sticky',
    269269            'to_type'         => 'topic',
    270             'to_fieldname'    => '_bbp_old_sticky_status',
     270            'to_fieldname'    => '_bbp_old_sticky_status_id',
    271271            'callback_method' => 'callback_sticky_status'
    272272        );
  • trunk/src/includes/admin/converters/bbPress1.php

    r5349 r5427  
    251251        );
    252252
    253         // Sticky status (Stored in postmeta))
     253        // Sticky status (Stored in postmeta)
    254254        $this->field_map[] = array(
    255255            'from_tablename'  => 'topics',
    256256            'from_fieldname'  => 'topic_sticky',
    257257            'to_type'         => 'topic',
    258             'to_fieldname'    => '_bbp_old_sticky_status',
     258            'to_fieldname'    => '_bbp_old_sticky_status_id',
    259259            'callback_method' => 'callback_sticky_status'
    260260        );
  • trunk/src/includes/admin/converters/e107v1.php

    r5426 r5427  
    236236            'from_fieldname'  => 'thread_s',
    237237            'to_type'         => 'topic',
    238             'to_fieldname'    => '_bbp_old_sticky_status',
     238            'to_fieldname'    => '_bbp_old_sticky_status_id',
    239239            'callback_method' => 'callback_sticky_status'
    240240        );
  • trunk/src/includes/admin/converters/phpBB.php

    r5426 r5427  
    253253        );
    254254
    255         // Sticky status (Stored in postmeta))
     255        // Sticky status (Stored in postmeta)
    256256        $this->field_map[] = array(
    257257            'from_tablename'  => 'topics',
    258258            'from_fieldname'  => 'topic_type',
    259259            'to_type'         => 'topic',
    260             'to_fieldname'    => '_bbp_old_sticky_status',
     260            'to_fieldname'    => '_bbp_old_sticky_status_id',
    261261            'callback_method' => 'callback_sticky_status'
    262262        );
  • trunk/src/includes/admin/converters/vBulletin.php

    r5426 r5427  
    245245        );
    246246
    247         // Sticky status (Stored in postmeta))
     247        // Sticky status (Stored in postmeta)
    248248        $this->field_map[] = array(
    249249            'from_tablename'  => 'thread',
    250250            'from_fieldname'  => 'sticky',
    251251            'to_type'         => 'topic',
    252             'to_fieldname'    => '_bbp_old_sticky_status',
     252            'to_fieldname'    => '_bbp_old_sticky_status_id',
    253253            'callback_method' => 'callback_sticky_status'
    254254        );
  • trunk/src/includes/admin/converters/vBulletin3.php

    r5426 r5427  
    245245        );
    246246
    247         // Sticky status (Stored in postmeta))
     247        // Sticky status (Stored in postmeta)
    248248        $this->field_map[] = array(
    249249            'from_tablename'  => 'thread',
    250250            'from_fieldname'  => 'sticky',
    251251            'to_type'         => 'topic',
    252             'to_fieldname'    => '_bbp_old_sticky_status',
     252            'to_fieldname'    => '_bbp_old_sticky_status_id',
    253253            'callback_method' => 'callback_sticky_status'
    254254        );
Note: See TracChangeset for help on using the changeset viewer.