Changeset 5170 for trunk/includes/admin/converters/Drupal7.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/Drupal7.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/Drupal7.php
r5138 r5170 191 191 ); 192 192 193 // Sticky status (Stored in postmeta)) 194 $this->field_map[] = array( 195 'from_tablename' => 'forum_index', 196 'from_fieldname' => 'sticky', 197 'to_type' => 'topic', 198 'to_fieldname' => '_bbp_old_sticky_status', 199 'callback_method' => 'callback_sticky_status' 200 ); 201 193 202 // Topic dates. 194 203 $this->field_map[] = array( … … 550 559 551 560 /** 561 * Translate the topic sticky status type from Drupal v7.x numeric's to WordPress's strings. 562 * 563 * @param int $status Drupal v7.x numeric forum type 564 * @return string WordPress safe 565 */ 566 public function callback_sticky_status( $status = 0 ) { 567 switch ( $status ) { 568 case 1 : 569 $status = 'sticky'; // Drupal Sticky 'topic_sticky = 1' 570 break; 571 572 case 0 : 573 default : 574 $status = 'normal'; // Drupal Normal Topic 'sticky = 0' 575 break; 576 } 577 return $status; 578 } 579 580 /** 552 581 * Verify the topic/reply count. 553 582 *
Note: See TracChangeset
for help on using the changeset viewer.