Changeset 5539 for trunk/src/includes/admin/converters/SMF.php
- Timestamp:
- 09/25/2014 07:05:49 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/converters/SMF.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converters/SMF.php
r5530 r5539 190 190 ); 191 191 192 // Topic author name (Stored in postmeta as _bbp_anonymous_name) 193 $this->field_map[] = array( 194 'from_tablename' => 'messages', 195 'from_fieldname' => 'poster_name', 196 'join_tablename' => 'topics', 197 'join_type' => 'LEFT', 198 'join_expression' => 'ON topics.id_first_msg = messages.id_msg', 199 'to_type' => 'topic', 200 'to_fieldname' => '_bbp_old_topic_author_name_id' 201 ); 202 203 // Is the topic anonymous (Stored in postmeta) 204 $this->field_map[] = array( 205 'from_tablename' => 'topics', 206 'from_fieldname' => 'id_member_started', 207 'to_type' => 'topic', 208 'to_fieldname' => '_bbp_old_is_topic_anonymous_id', 209 'callback_method' => 'callback_check_anonymous' 210 ); 211 192 212 // Topic Author ip (Stored in postmeta) 193 213 $this->field_map[] = array( … … 368 388 'to_fieldname' => 'post_author', 369 389 'callback_method' => 'callback_userid' 390 ); 391 392 // Reply author name (Stored in postmeta as _bbp_anonymous_name) 393 $this->field_map[] = array( 394 'from_tablename' => 'messages', 395 'from_fieldname' => 'poster_name', 396 'to_type' => 'reply', 397 'to_fieldname' => '_bbp_old_reply_author_name_id' 398 ); 399 400 // Is the reply anonymous (Stored in postmeta) 401 $this->field_map[] = array( 402 'from_tablename' => 'messages', 403 'from_fieldname' => 'id_member', 404 'to_type' => 'reply', 405 'to_fieldname' => '_bbp_old_is_reply_anonymous_id', 406 'callback_method' => 'callback_check_anonymous' 370 407 ); 371 408 … … 641 678 $count = absint( (int) $count - 1 ); 642 679 return $count; 680 } 681 682 /** 683 * Check the anonymous topic or reply status 684 * 685 * @since (r5539) 686 * 687 * @param int $status SMF v2.x anonymous topic/reply status 688 * @return string WordPress safe 689 */ 690 public function callback_check_anonymous( $status = 0 ) { 691 if ( $status == 0 ) { 692 $status = 'true'; 693 } else { 694 $status = 'false'; 695 } 696 return $status; 643 697 } 644 698
Note: See TracChangeset
for help on using the changeset viewer.