Changeset 5170 for trunk/includes/admin/converters/vBulletin.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/vBulletin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/vBulletin.php
r5153 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 … … 588 597 589 598 /** 599 * Translate the topic sticky status type from vBulletin v4.x numeric's to WordPress's strings. 600 * 601 * @param int $status vBulletin v4.x numeric forum type 602 * @return string WordPress safe 603 */ 604 public function callback_sticky_status( $status = 0 ) { 605 switch ( $status ) { 606 case 2 : 607 $status = 'super-sticky'; // vBulletin Super Sticky 'sticky = 2' 608 break; 609 610 case 1 : 611 $status = 'sticky'; // vBulletin Sticky 'sticky = 1' 612 break; 613 614 case 0 : 615 default : 616 $status = 'normal'; // vBulletin Normal Topic 'sticky = 0' 617 break; 618 } 619 return $status; 620 } 621 622 /** 590 623 * Verify the topic reply count. 591 624 *
Note: See TracChangeset
for help on using the changeset viewer.