Changeset 5170 for trunk/includes/admin/converters/vBulletin3.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/vBulletin3.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/vBulletin3.php
r5152 r5170 236 236 ); 237 237 238 // Topic status (Open or Closed) 239 $this->field_map[] = array( 240 'from_tablename' => 'thread', 241 'from_fieldname' => 'open', 242 'to_type' => 'topic', 243 'to_fieldname' => 'post_status', 244 'callback_method' => 'callback_topic_status' 245 ); 246 247 // Sticky status (Stored in postmeta)) 248 $this->field_map[] = array( 249 'from_tablename' => 'thread', 250 'from_fieldname' => 'sticky', 251 'to_type' => 'topic', 252 'to_fieldname' => '_bbp_old_sticky_status', 253 'callback_method' => 'callback_sticky_status' 254 ); 255 238 256 // Topic dates. 239 257 $this->field_map[] = array( … … 271 289 'to_fieldname' => '_bbp_last_active_time', 272 290 'callback_method' => 'callback_datetime' 273 );274 275 // Topic status (Open or Closed)276 $this->field_map[] = array(277 'from_tablename' => 'thread',278 'from_fieldname' => 'open',279 'to_type' => 'topic',280 'to_fieldname' => 'post_status',281 'callback_method' => 'callback_topic_status'282 291 ); 283 292 … … 587 596 } else { 588 597 $status = 'forum'; 598 } 599 return $status; 600 } 601 602 /** 603 * Translate the topic sticky status type from vBulletin v3.x numeric's to WordPress's strings. 604 * 605 * @param int $status vBulletin v3.x numeric forum type 606 * @return string WordPress safe 607 */ 608 public function callback_sticky_status( $status = 0 ) { 609 switch ( $status ) { 610 case 1 : 611 $status = 'sticky'; // vBulletin Sticky 'topic_sticky = 1' 612 break; 613 614 case 0 : 615 default : 616 $status = 'normal'; // vBulletin Normal Topic 'topic_sticky = 0' 617 break; 589 618 } 590 619 return $status;
Note: See TracChangeset
for help on using the changeset viewer.