Changeset 5170 for trunk/includes/admin/converters/XMB.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/XMB.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/XMB.php
r5144 r5170 240 240 ); 241 241 242 // Topic status (Open or Closed, XMB v1.9.11.13 ''=open & 'yes'=closed) 243 $this->field_map[] = array( 244 'from_tablename' => 'threads', 245 'from_fieldname' => 'closed', 246 'to_type' => 'topic', 247 'to_fieldname' => 'post_status', 248 'callback_method' => 'callback_topic_status' 249 ); 250 251 // Sticky status (Stored in postmeta)) 252 $this->field_map[] = array( 253 'from_tablename' => 'threads', 254 'from_fieldname' => 'topped', 255 'to_type' => 'topic', 256 'to_fieldname' => '_bbp_old_sticky_status', 257 'callback_method' => 'callback_sticky_status' 258 ); 259 242 260 // Topic dates. 243 261 // Note: We join the 'posts' table because 'threads' table does not include dates. … … 291 309 'to_fieldname' => '_bbp_last_active_time', 292 310 'callback_method' => 'callback_datetime' 293 );294 295 // Topic status (Open or Closed, XMB v1.9.11.13 ''=open & 'yes'=closed)296 $this->field_map[] = array(297 'from_tablename' => 'threads',298 'from_fieldname' => 'closed',299 'to_type' => 'topic',300 'to_fieldname' => 'post_status',301 'callback_method' => 'callback_topic_status'302 311 ); 303 312 … … 657 666 658 667 /** 668 * Translate the topic sticky status type from XMB v1.9.11.13 numeric's to WordPress's strings. 669 * 670 * @param int $status XMB v1.9.11.13 numeric forum type 671 * @return string WordPress safe 672 */ 673 public function callback_sticky_status( $status = 0 ) { 674 switch ( $status ) { 675 case 1 : 676 $status = 'sticky'; // XMB Sticky 'topped = 1' 677 break; 678 679 case 0 : 680 default : 681 $status = 'normal'; // XMB Normal Topic 'topped = 0' 682 break; 683 } 684 return $status; 685 } 686 687 /** 659 688 * Verify the topic/reply count. 660 689 *
Note: See TracChangeset
for help on using the changeset viewer.