Skip to:
Content

bbPress.org

Ticket #2716: 2716.diff

File 2716.diff, 8.3 KB (added by netweb, 10 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                );
    51 
     51/**
    5252                // Forum reply count (Stored in postmeta)
    5353                $this->field_map[] = array(
    5454                        'from_tablename' => 'forums',
     
    7272                        'to_type'        => 'forum',
    7373                        'to_fieldname'   => '_bbp_total_reply_count'
    7474                );
    75 
     75*/
    7676                // Forum title.
    7777                $this->field_map[] = array(
    7878                        'from_tablename' => 'forums',
     
    147147                        'default'      => date('Y-m-d H:i:s')
    148148                );
    149149
     150                /** Forum Subscriptions Section ***************************************/
     151
     152                // User subscribed forums (Stored in usermeta)
     153                $this->field_map[] = array(
     154                        'from_tablename'  => 'forums_watch',
     155                        'from_fieldname'  => 'forum_id',
     156                        'to_type'         => 'forum_subscriptions',
     157                        'to_fieldname'    => '_bbp_old_forum_subscriptions_id'
     158                );
     159
     160                // Old User ID subscribed forums (Stored in usermeta)
     161                $this->field_map[] = array(
     162                        'from_tablename'  => 'forums_watch',
     163                        'from_fieldname'  => 'user_id',
     164                        'to_type'         => 'forum_subscriptions',
     165                        'to_fieldname'    => '_bbp_old_forum_subscriptions_user_id'
     166                );
    150167                /** Topic Section *****************************************************/
    151168
    152169                // Old topic id (Stored in postmeta)
     
    160177                // Topic reply count (Stored in postmeta)
    161178                $this->field_map[] = array(
    162179                        'from_tablename'  => 'topics',
    163                         'from_fieldname'  => 'topic_replies',
     180                        'from_fieldname'  => 'topic_posts_approved',
    164181                        'to_type'         => 'topic',
    165182                        'to_fieldname'    => '_bbp_reply_count',
    166183                        'callback_method' => 'callback_topic_reply_count'
    167184                );
    168 
     185/**
    169186                // Topic total reply count (Includes unpublished replies, Stored in postmeta)
    170187                $this->field_map[] = array(
    171188                        'from_tablename'  => 'topics',
     
    174191                        'to_fieldname'    => '_bbp_total_reply_count',
    175192                        'callback_method' => 'callback_topic_reply_count'
    176193                );
    177 
     194*/
    178195                // Topic parent forum id (If no parent, then 0. Stored in postmeta)
    179196                $this->field_map[] = array(
    180197                        'from_tablename'  => 'topics',
     
    321338                 * phpBB Forums do not support topic tags
    322339                 */
    323340
     341                /** Topic Subscriptions Section ***************************************/
     342
     343                // User subscribed topics (Stored in usermeta)
     344                $this->field_map[] = array(
     345                        'from_tablename'  => 'topics_watch',
     346                        'from_fieldname'  => 'topic_id',
     347                        'to_type'         => 'topic_subscriptions',
     348                        'to_fieldname'    => '_bbp_old_topic_subscriptions_id'
     349                );
     350
     351                // Old User ID subscribed topics (Stored in usermeta)
     352                $this->field_map[] = array(
     353                        'from_tablename'  => 'topics_watch',
     354                        'from_fieldname'  => 'user_id',
     355                        'to_type'         => 'topic_subscriptions',
     356                        'to_fieldname'    => '_bbp_old_topic_subscriptions_user_id'
     357                );
     358
     359                /** Favorites Section *************************************************/
     360
     361
     362                // User favorite topics (Stored in usermeta)
     363                $this->field_map[] = array(
     364                        'from_tablename'  => 'bookmarks',
     365                        'from_fieldname'  => 'topic_id',
     366                        'to_type'         => 'favorites',
     367                        'to_fieldname'    => '_bbp_old_favorites_id'
     368                );
     369
     370                // Old User ID favorite topics (Stored in usermeta)
     371                $this->field_map[] = array(
     372                        'from_tablename'  => 'bookmarks',
     373                        'from_fieldname'  => 'user_id',
     374                        'to_type'         => 'favorites',
     375                        'to_fieldname'    => '_bbp_old_favorites_user_id'
     376                );
     377
    324378                /** Reply Section *****************************************************/
    325379
    326380                // Old reply id (Stored in postmeta)
     
    448502                $this->field_map[] = array(
    449503                        'from_tablename'  => 'users',
    450504                        'from_fieldname'  => 'user_id',
    451                         'from_expression' => 'WHERE user_type !=2',
    452505                        'to_type'         => 'user',
    453506                        'to_fieldname'    => '_bbp_old_user_id'
    454507                );
     
    495548
    496549                // User homepage.
    497550                $this->field_map[] = array(
    498                         'from_tablename' => 'users',
    499                         'from_fieldname' => 'user_website',
    500                         'to_type'        => 'user',
    501                         'to_fieldname'   => 'user_url'
     551                        'from_tablename'  => 'profile_fields_data',
     552                        'from_fieldname'  => 'pf_phpbb_website',
     553                        'join_tablename'  => 'users',
     554                        'join_type'       => 'LEFT',
     555                        'join_expression' => 'USING (user_id) WHERE users.user_type !=2',
     556                        'to_type'         => 'user',
     557                        'to_fieldname'    => 'user_url'
    502558                );
    503559
    504560                // User registered.
     
    510566                        'callback_method' => 'callback_datetime'
    511567                );
    512568
    513                 // User AIM (Stored in usermeta)
     569                // User AOL/AIM (Stored in usermeta)
    514570                $this->field_map[] = array(
    515                         'from_tablename' => 'users',
    516                         'from_fieldname' => 'user_aim',
     571                        'from_tablename' => 'profile_fields_data',
     572                        'from_fieldname' => 'pf_phpbb_aol',
    517573                        'to_type'        => 'user',
    518574                        'to_fieldname'   => 'aim'
    519575                );
     
    520576
    521577                // User Yahoo (Stored in usermeta)
    522578                $this->field_map[] = array(
    523                         'from_tablename' => 'users',
    524                         'from_fieldname' => 'user_yim',
     579                        'from_tablename' => 'profile_fields_data',
     580                        'from_fieldname' => 'pf_phpbb_yahoo',
    525581                        'to_type'        => 'user',
    526582                        'to_fieldname'   => 'yim'
    527583                );
     
    528584
    529585                // Store ICQ (Stored in usermeta)
    530586                $this->field_map[] = array(
    531                         'from_tablename' => 'users',
    532                         'from_fieldname' => 'user_icq',
     587                        'from_tablename' => 'profile_fields_data',
     588                        'from_fieldname' => 'pf_phpbb_icq',
    533589                        'to_type'        => 'user',
    534590                        'to_fieldname'   => '_bbp_phpbb_user_icq'
    535591                );
    536592
    537                 // Store MSN (Stored in usermeta)
     593                // Store MSN/WLM (Stored in usermeta)
    538594                $this->field_map[] = array(
    539                         'from_tablename' => 'users',
    540                         'from_fieldname' => 'user_msnm',
     595                        'from_tablename' => 'profile_fields_data',
     596                        'from_fieldname' => 'pf_phpbb_wlm',
    541597                        'to_type'        => 'user',
    542598                        'to_fieldname'   => '_bbp_phpbb_user_msnm'
    543599                );
    544600
     601                // Store Facebook (Stored in usermeta)
     602                $this->field_map[] = array(
     603                        'from_tablename' => 'profile_fields_data',
     604                        'from_fieldname' => 'pf_phpbb_facebook',
     605                        'to_type'        => 'user',
     606                        'to_fieldname'   => '_bbp_phpbb_user_facebook'
     607                );
     608
     609                // Store Google+ (Stored in usermeta)
     610                $this->field_map[] = array(
     611                        'from_tablename' => 'profile_fields_data',
     612                        'from_fieldname' => 'pf_phpbb_googleplus',
     613                        'to_type'        => 'user',
     614                        'to_fieldname'   => '_bbp_phpbb_user_googleplus'
     615                );
     616
     617                // Store Skype (Stored in usermeta)
     618                $this->field_map[] = array(
     619                        'from_tablename' => 'profile_fields_data',
     620                        'from_fieldname' => 'pf_phpbb_skype',
     621                        'to_type'        => 'user',
     622                        'to_fieldname'   => '_bbp_phpbb_user_skype'
     623                );
     624
     625                // Store Twitter (Stored in usermeta)
     626                $this->field_map[] = array(
     627                        'from_tablename' => 'profile_fields_data',
     628                        'from_fieldname' => 'pf_phpbb_twitter',
     629                        'to_type'        => 'user',
     630                        'to_fieldname'   => '_bbp_phpbb_user_twitter'
     631                );
     632
     633                // Store Youtube (Stored in usermeta)
     634                $this->field_map[] = array(
     635                        'from_tablename' => 'profile_fields_data',
     636                        'from_fieldname' => 'pf_phpbb_youtube',
     637                        'to_type'        => 'user',
     638                        'to_fieldname'   => '_bbp_phpbb_user_youtube'
     639                );
     640
    545641                // Store Jabber
    546642                $this->field_map[] = array(
    547643                        'from_tablename' => 'users',
     
    552648
    553649                // Store Occupation (Stored in usermeta)
    554650                $this->field_map[] = array(
    555                         'from_tablename' => 'users',
    556                         'from_fieldname' => 'user_occ',
     651                        'from_tablename' => 'profile_fields_data',
     652                        'from_fieldname' => 'pf_phpbb_occupation',
    557653                        'to_type'        => 'user',
    558654                        'to_fieldname'   => '_bbp_phpbb_user_occ'
    559655                );
     
    560656
    561657                // Store Interests (Stored in usermeta)
    562658                $this->field_map[] = array(
    563                         'from_tablename' => 'users',
    564                         'from_fieldname' => 'user_interests',
     659                        'from_tablename' => 'profile_fields_data',
     660                        'from_fieldname' => 'pf_phpbb_interests',
    565661                        'to_type'        => 'user',
    566662                        'to_fieldname'   => '_bbp_phpbb_user_interests'
    567663                );
     
    577673
    578674                // Store Location (Stored in usermeta)
    579675                $this->field_map[] = array(
    580                         'from_tablename' => 'users',
    581                         'from_fieldname' => 'user_from',
     676                        'from_tablename' => 'profile_fields_data',
     677                        'from_fieldname' => 'pf_phpbb_location',
    582678                        'to_type'        => 'user',
    583679                        'to_fieldname'   => '_bbp_phpbb_user_from'
    584680                );