Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/15/2014 04:30:55 AM (11 years ago)
Author:
netweb
Message:

Replies now use the reply ID for the the post name/slug via r5117.
bbPress' importers should also reflect that change with the removal of 'Reply Title' (post_title), 'Reply Slug' (post_name) and callback_reply_title from all importers. Props netweb. Fixes #2585

File:
1 edited

Legend:

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

    r5176 r5349  
    382382        );
    383383
    384         // Reply title.
    385         // Note: We join the 'thread' table because 'post' table does not include reply title.
    386         $this->field_map[] = array(
    387             'from_tablename'  => 'thread',
    388             'from_fieldname'  => 'title',
    389             'join_tablename'  => 'post',
    390             'join_type'       => 'INNER',
    391             'join_expression' => 'USING (threadid) WHERE post.parentid != 0',
    392             'to_type'         => 'reply',
    393             'to_fieldname'    => 'post_title',
    394             'callback_method' => 'callback_reply_title'
    395         );
    396 
    397         // Reply slug (Clean name to avoid conflicts)
    398         // Note: We join the 'thread' table because 'post' table does not include reply slug.
    399         $this->field_map[] = array(
    400             'from_tablename'  => 'thread',
    401             'from_fieldname'  => 'title',
    402             'join_tablename'  => 'post',
    403             'join_type'       => 'INNER',
    404             'join_expression' => 'USING (threadid) WHERE post.parentid != 0',
    405             'to_type'         => 'reply',
    406             'to_fieldname'    => 'post_name',
    407             'callback_method' => 'callback_slug'
    408         );
    409 
    410384        // Reply content.
    411385        $this->field_map[] = array(
     
    641615        $count = absint( (int) $count - 1 );
    642616        return $count;
    643     }
    644 
    645     /**
    646      * Set the reply title
    647      *
    648      * @param string $title vBulletin v4.x topic title of this reply
    649      * @return string Prefixed topic title, or empty string
    650      */
    651     public function callback_reply_title( $title = '' ) {
    652         $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';
    653         return $title;
    654617    }
    655618
Note: See TracChangeset for help on using the changeset viewer.