Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/28/2015 04:40:08 AM (9 years ago)
Author:
netweb
Message:

Importers: Update phpbB importer to support phpBB 3.1.x database schema changes

  • Note: Importing from phpBB 3.0.x is no longer supported, please update to phpBB 3.1.x before importing

Props netweb. Fixes #2716

File:
1 edited

Legend:

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

    r5770 r5795  
    4545        $this->field_map[] = array(
    4646            'from_tablename' => 'forums',
    47             'from_fieldname' => 'forum_topics',
     47            'from_fieldname' => 'forum_topics_approved',
    4848            'to_type'        => 'forum',
    4949            'to_fieldname'   => '_bbp_topic_count'
     
    5353        $this->field_map[] = array(
    5454            'from_tablename' => 'forums',
    55             'from_fieldname' => 'forum_posts',
     55            'from_fieldname' => 'forum_posts_approved',
    5656            'to_type'        => 'forum',
    5757            'to_fieldname'   => '_bbp_reply_count'
     
    161161        $this->field_map[] = array(
    162162            'from_tablename'  => 'topics',
    163             'from_fieldname'  => 'topic_replies',
     163            'from_fieldname'  => 'topic_posts_approved',
    164164            'to_type'         => 'topic',
    165165            'to_fieldname'    => '_bbp_reply_count',
     
    170170        $this->field_map[] = array(
    171171            'from_tablename'  => 'topics',
    172             'from_fieldname'  => 'topic_replies_real',
     172            'from_fieldname'  => 'topic_posts_approved',
    173173            'to_type'         => 'topic',
    174174            'to_fieldname'    => '_bbp_total_reply_count',
     
    449449            'from_tablename'  => 'users',
    450450            'from_fieldname'  => 'user_id',
    451             'from_expression' => 'WHERE user_type !=2',
    452451            'to_type'         => 'user',
    453452            'to_fieldname'    => '_bbp_old_user_id'
     
    496495        // User homepage.
    497496        $this->field_map[] = array(
    498             'from_tablename' => 'users',
    499             'from_fieldname' => 'user_website',
    500             'to_type'        => 'user',
    501             'to_fieldname'   => 'user_url'
     497            'from_tablename'  => 'profile_fields_data',
     498            'from_fieldname'  => 'pf_phpbb_website',
     499            'join_tablename'  => 'users',
     500            'join_type'       => 'LEFT',
     501            'join_expression' => 'USING (user_id) WHERE users.user_type !=2',
     502            'to_type'         => 'user',
     503            'to_fieldname'    => 'user_url'
    502504        );
    503505
     
    511513        );
    512514
    513         // User AIM (Stored in usermeta)
    514         $this->field_map[] = array(
    515             'from_tablename' => 'users',
    516             'from_fieldname' => 'user_aim',
     515        // User AOL/AIM (Stored in usermeta)
     516        $this->field_map[] = array(
     517            'from_tablename' => 'profile_fields_data',
     518            'from_fieldname' => 'pf_phpbb_aol',
    517519            'to_type'        => 'user',
    518520            'to_fieldname'   => 'aim'
     
    521523        // User Yahoo (Stored in usermeta)
    522524        $this->field_map[] = array(
    523             'from_tablename' => 'users',
    524             'from_fieldname' => 'user_yim',
     525            'from_tablename' => 'profile_fields_data',
     526            'from_fieldname' => 'pf_phpbb_yahoo',
    525527            'to_type'        => 'user',
    526528            'to_fieldname'   => 'yim'
     
    529531        // Store ICQ (Stored in usermeta)
    530532        $this->field_map[] = array(
    531             'from_tablename' => 'users',
    532             'from_fieldname' => 'user_icq',
     533            'from_tablename' => 'profile_fields_data',
     534            'from_fieldname' => 'pf_phpbb_icq',
    533535            'to_type'        => 'user',
    534536            'to_fieldname'   => '_bbp_phpbb_user_icq'
    535537        );
    536538
    537         // Store MSN (Stored in usermeta)
    538         $this->field_map[] = array(
    539             'from_tablename' => 'users',
    540             'from_fieldname' => 'user_msnm',
     539        // Store MSN/WLM (Stored in usermeta)
     540        $this->field_map[] = array(
     541            'from_tablename' => 'profile_fields_data',
     542            'from_fieldname' => 'pf_phpbb_wlm',
    541543            'to_type'        => 'user',
    542544            'to_fieldname'   => '_bbp_phpbb_user_msnm'
     545        );
     546
     547        // Store Facebook (Stored in usermeta)
     548        $this->field_map[] = array(
     549            'from_tablename' => 'profile_fields_data',
     550            'from_fieldname' => 'pf_phpbb_facebook',
     551            'to_type'        => 'user',
     552            'to_fieldname'   => '_bbp_phpbb_user_facebook'
     553        );
     554
     555        // Store Google+ (Stored in usermeta)
     556        $this->field_map[] = array(
     557            'from_tablename' => 'profile_fields_data',
     558            'from_fieldname' => 'pf_phpbb_googleplus',
     559            'to_type'        => 'user',
     560            'to_fieldname'   => '_bbp_phpbb_user_googleplus'
     561        );
     562
     563        // Store Skype (Stored in usermeta)
     564        $this->field_map[] = array(
     565            'from_tablename' => 'profile_fields_data',
     566            'from_fieldname' => 'pf_phpbb_skype',
     567            'to_type'        => 'user',
     568            'to_fieldname'   => '_bbp_phpbb_user_skype'
     569        );
     570
     571        // Store Twitter (Stored in usermeta)
     572        $this->field_map[] = array(
     573            'from_tablename' => 'profile_fields_data',
     574            'from_fieldname' => 'pf_phpbb_twitter',
     575            'to_type'        => 'user',
     576            'to_fieldname'   => '_bbp_phpbb_user_twitter'
     577        );
     578
     579        // Store Youtube (Stored in usermeta)
     580        $this->field_map[] = array(
     581            'from_tablename' => 'profile_fields_data',
     582            'from_fieldname' => 'pf_phpbb_youtube',
     583            'to_type'        => 'user',
     584            'to_fieldname'   => '_bbp_phpbb_user_youtube'
    543585        );
    544586
     
    553595        // Store Occupation (Stored in usermeta)
    554596        $this->field_map[] = array(
    555             'from_tablename' => 'users',
    556             'from_fieldname' => 'user_occ',
     597            'from_tablename' => 'profile_fields_data',
     598            'from_fieldname' => 'pf_phpbb_occupation',
    557599            'to_type'        => 'user',
    558600            'to_fieldname'   => '_bbp_phpbb_user_occ'
     
    561603        // Store Interests (Stored in usermeta)
    562604        $this->field_map[] = array(
    563             'from_tablename' => 'users',
    564             'from_fieldname' => 'user_interests',
     605            'from_tablename' => 'profile_fields_data',
     606            'from_fieldname' => 'pf_phpbb_interests',
    565607            'to_type'        => 'user',
    566608            'to_fieldname'   => '_bbp_phpbb_user_interests'
     
    578620        // Store Location (Stored in usermeta)
    579621        $this->field_map[] = array(
    580             'from_tablename' => 'users',
    581             'from_fieldname' => 'user_from',
     622            'from_tablename' => 'profile_fields_data',
     623            'from_fieldname' => 'pf_phpbb_location',
    582624            'to_type'        => 'user',
    583625            'to_fieldname'   => '_bbp_phpbb_user_from'
Note: See TracChangeset for help on using the changeset viewer.