Skip to:
Content

bbPress.org

Ticket #2716: 2716.1.diff

File 2716.1.diff, 6.0 KB (added by netweb, 9 years ago)
  • src/includes/admin/converters/phpBB.php

     
    4444                // Forum topic count (Stored in postmeta)
    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'
    5050                );
     
    5252                // Forum reply count (Stored in postmeta)
    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'
    5858                );
     
    160160                // Topic reply count (Stored in postmeta)
    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',
    166166                        'callback_method' => 'callback_topic_reply_count'
     
    169169                // Topic total reply count (Includes unpublished replies, Stored in postmeta)
    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',
    175175                        'callback_method' => 'callback_topic_reply_count'
     
    448448                $this->field_map[] = array(
    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'
    454453                );
     
    495494
    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
    504506                // User registered.
     
    510512                        'callback_method' => 'callback_datetime'
    511513                );
    512514
    513                 // User AIM (Stored in usermeta)
     515                // User AOL/AIM (Stored in usermeta)
    514516                $this->field_map[] = array(
    515                         'from_tablename' => 'users',
    516                         'from_fieldname' => 'user_aim',
     517                        'from_tablename' => 'profile_fields_data',
     518                        'from_fieldname' => 'pf_phpbb_aol',
    517519                        'to_type'        => 'user',
    518520                        'to_fieldname'   => 'aim'
    519521                );
     
    520522
    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'
    527529                );
     
    528530
    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)
     539                // Store MSN/WLM (Stored in usermeta)
    538540                $this->field_map[] = array(
    539                         'from_tablename' => 'users',
    540                         'from_fieldname' => 'user_msnm',
     541                        'from_tablename' => 'profile_fields_data',
     542                        'from_fieldname' => 'pf_phpbb_wlm',
    541543                        'to_type'        => 'user',
    542544                        'to_fieldname'   => '_bbp_phpbb_user_msnm'
    543545                );
    544546
     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'
     585                );
     586
    545587                // Store Jabber
    546588                $this->field_map[] = array(
    547589                        'from_tablename' => 'users',
     
    552594
    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'
    559601                );
     
    560602
    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'
    567609                );
     
    577619
    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'
    584626                );