Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/22/2014 12:46:45 PM (11 years ago)
Author:
netweb
Message:

SMF importer: Include Subscribed Forums and Subscribed Topics
Props netweb. See #2668

File:
1 edited

Legend:

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

    r5557 r5576  
    144144        );
    145145
     146        /** Forum Subscriptions Section ***************************************/
     147
     148        // Subscribed forum ID (Stored in usermeta)
     149        $this->field_map[] = array(
     150            'from_tablename'  => 'log_notify',
     151            'from_fieldname'  => 'id_board',
     152            'from_expression' => 'WHERE log_notify.id_board != 0',
     153            'to_type'         => 'forum_subscriptions',
     154            'to_fieldname'    => '_bbp_forum_subscriptions'
     155        );
     156
     157        // Subscribed user ID (Stored in usermeta)
     158        $this->field_map[] = array(
     159            'from_tablename'  => 'log_notify',
     160            'from_fieldname'  => 'id_member',
     161            'from_expression' => 'WHERE log_notify.id_board != 0',
     162            'to_type'         => 'forum_subscriptions',
     163            'to_fieldname'    => 'user_id',
     164            'callback_method' => 'callback_userid'
     165        );
     166
    146167        /** Topic Section ******************************************************/
    147168
     
    342363         */
    343364
    344         /** Reply Section ******************************************************/
     365        /** Topic Subscriptions Section ***************************************/
     366
     367        // Subscribed topic ID (Stored in usermeta)
     368        $this->field_map[] = array(
     369            'from_tablename'  => 'log_notify',
     370            'from_fieldname'  => 'id_topic',
     371            'from_expression' => 'WHERE log_notify.id_topic != 0',
     372            'to_type'         => 'topic_subscriptions',
     373            'to_fieldname'    => '_bbp_subscriptions'
     374        );
     375
     376        // Subscribed user ID (Stored in usermeta)
     377        $this->field_map[] = array(
     378            'from_tablename'  => 'log_notify',
     379            'from_fieldname'  => 'id_member',
     380            'from_expression' => 'WHERE log_notify.id_topic != 0',
     381            'to_type'         => 'topic_subscriptions',
     382            'to_fieldname'    => 'user_id',
     383            'callback_method' => 'callback_userid'
     384        );
     385
     386        /** Reply Section *****************************************************/
    345387
    346388        // Old reply id (Stored in postmeta)
Note: See TracChangeset for help on using the changeset viewer.