Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/10/2014 10:25:07 AM (12 years ago)
Author:
netweb
Message:

Include anonymous topic and reply import support in XMB 1.x (XMB.php) and PunBB (PunBB.php) importers
Props netweb. See #2347

File:
1 edited

Legend:

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

    r5530 r5550  
    186186        );
    187187
     188        // Topic author name (Stored in postmeta as _bbp_anonymous_name)
     189        $this->field_map[] = array(
     190            'from_tablename'  => 'topics',
     191            'from_fieldname'  => 'poster',
     192            'to_type'         => 'topic',
     193            'to_fieldname'    => '_bbp_old_topic_author_name_id'
     194        );
     195
     196        // Is the topic anonymous (Stored in postmeta)
     197        $this->field_map[] = array(
     198            'from_tablename'  => 'posts',
     199            'from_fieldname'  => 'poster_id',
     200            'join_tablename'  => 'topics',
     201            'join_type'       => 'LEFT',
     202            'join_expression' => 'ON topics.first_post_id = posts.id',
     203            'to_type'         => 'topic',
     204            'to_fieldname'    => '_bbp_old_is_topic_anonymous_id',
     205            'callback_method' => 'callback_check_anonymous'
     206        );
     207
    188208        // Topic Author ip (Stored in postmeta)
    189209        // Note: We join the 'posts' table because 'topics' table does not have author ip.
     
    344364            'to_fieldname'    => 'post_author',
    345365            'callback_method' => 'callback_userid'
     366        );
     367
     368        // Reply author name (Stored in postmeta as _bbp_anonymous_name)
     369        $this->field_map[] = array(
     370            'from_tablename'  => 'posts',
     371            'from_fieldname'  => 'poster',
     372            'to_type'         => 'reply',
     373            'to_fieldname'    => '_bbp_old_reply_author_name_id'
     374        );
     375
     376        // Is the reply anonymous (Stored in postmeta)
     377        $this->field_map[] = array(
     378            'from_tablename'  => 'posts',
     379            'from_fieldname'  => 'poster_id',
     380            'to_type'         => 'reply',
     381            'to_fieldname'    => '_bbp_old_is_reply_anonymous_id',
     382            'callback_method' => 'callback_check_anonymous'
    346383        );
    347384
Note: See TracChangeset for help on using the changeset viewer.