Skip to:
Content

bbPress.org

Changeset 5545


Ignore:
Timestamp:
10/10/2014 07:19:03 AM (10 years ago)
Author:
netweb
Message:

vBulletin 3 & 4: Fix reply parent forum id in vBulletin.php and vBulletin3.php importers

  • Retrieves the replies topic ID and utilizes callback_topicid_to_forumid mini cache to convert the topic id to the new forum ID
  • Eliminates an unnecessary SQL join improving import performance.
Location:
trunk/src/includes/admin/converters
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/converters/vBulletin.php

    r5530 r5545  
    351351
    352352        // Reply parent forum id (If no parent, then 0. Stored in postmeta)
    353         // Note: We join the 'thread' table because 'post' table does not include forum id.
    354         $this->field_map[] = array(
    355             'from_tablename'  => 'thread',
    356             'from_fieldname'  => 'forumid',
    357             'join_tablename'  => 'post',
    358             'join_type'       => 'INNER',
    359             'join_expression' => 'USING (threadid) WHERE post.parentid != 0',
     353        $this->field_map[] = array(
     354            'from_tablename'  => 'post',
     355            'from_fieldname'  => 'threadid',
     356            'from_expression' => 'WHERE parentid != 0',
    360357            'to_type'         => 'reply',
    361358            'to_fieldname'    => '_bbp_forum_id',
  • trunk/src/includes/admin/converters/vBulletin3.php

    r5530 r5545  
    351351
    352352        // Reply parent forum id (If no parent, then 0. Stored in postmeta)
    353         // Note: We join the 'thread' table because 'post' table does not include forum id.
    354         $this->field_map[] = array(
    355             'from_tablename'  => 'thread',
    356             'from_fieldname'  => 'forumid',
    357             'join_tablename'  => 'post',
    358             'join_type'       => 'INNER',
    359             'join_expression' => 'USING (threadid) WHERE post.parentid != 0',
     353        $this->field_map[] = array(
     354            'from_tablename'  => 'post',
     355            'from_fieldname'  => 'threadid',
     356            'from_expression' => 'WHERE parentid != 0',
    360357            'to_type'         => 'reply',
    361358            'to_fieldname'    => '_bbp_forum_id',
Note: See TracChangeset for help on using the changeset viewer.