Changeset 5170 for trunk/includes/admin/converters/PHPFox3.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/PHPFox3.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/PHPFox3.php
r5147 r5170 234 234 ); 235 235 236 // Topic dates.237 $this->field_map[] = array(238 'from_tablename' => 'forum_thread',239 'from_fieldname' => 'time_stamp',240 'to_type' => 'topic',241 'to_fieldname' => 'post_date',242 'callback_method' => 'callback_datetime'243 );244 $this->field_map[] = array(245 'from_tablename' => 'forum_thread',246 'from_fieldname' => 'time_stamp',247 'to_type' => 'topic',248 'to_fieldname' => 'post_date_gmt',249 'callback_method' => 'callback_datetime'250 );251 $this->field_map[] = array(252 'from_tablename' => 'forum_thread',253 'from_fieldname' => 'time_update',254 'to_type' => 'topic',255 'to_fieldname' => 'post_modified',256 'callback_method' => 'callback_datetime'257 );258 $this->field_map[] = array(259 'from_tablename' => 'forum_thread',260 'from_fieldname' => 'time_update',261 'to_type' => 'topic',262 'to_fieldname' => 'post_modified_gmt',263 'callback_method' => 'callback_datetime'264 );265 $this->field_map[] = array(266 'from_tablename' => 'forum_thread',267 'from_fieldname' => 'time_update',268 'to_type' => 'topic',269 'to_fieldname' => '_bbp_last_active_time',270 'callback_method' => 'callback_datetime'271 );272 273 236 // Topic status (Open or Closed, PHPFox v3.5.x 0=open & 1=closed) 274 237 $this->field_map[] = array( … … 278 241 'to_fieldname' => 'post_status', 279 242 'callback_method' => 'callback_topic_status' 243 ); 244 245 // Sticky status (Stored in postmeta)) 246 $this->field_map[] = array( 247 'from_tablename' => 'forum_thread', 248 'from_fieldname' => 'order_id', 249 'to_type' => 'topic', 250 'to_fieldname' => '_bbp_old_sticky_status', 251 'callback_method' => 'callback_sticky_status' 252 ); 253 254 // Topic dates. 255 $this->field_map[] = array( 256 'from_tablename' => 'forum_thread', 257 'from_fieldname' => 'time_stamp', 258 'to_type' => 'topic', 259 'to_fieldname' => 'post_date', 260 'callback_method' => 'callback_datetime' 261 ); 262 $this->field_map[] = array( 263 'from_tablename' => 'forum_thread', 264 'from_fieldname' => 'time_stamp', 265 'to_type' => 'topic', 266 'to_fieldname' => 'post_date_gmt', 267 'callback_method' => 'callback_datetime' 268 ); 269 $this->field_map[] = array( 270 'from_tablename' => 'forum_thread', 271 'from_fieldname' => 'time_update', 272 'to_type' => 'topic', 273 'to_fieldname' => 'post_modified', 274 'callback_method' => 'callback_datetime' 275 ); 276 $this->field_map[] = array( 277 'from_tablename' => 'forum_thread', 278 'from_fieldname' => 'time_update', 279 'to_type' => 'topic', 280 'to_fieldname' => 'post_modified_gmt', 281 'callback_method' => 'callback_datetime' 282 ); 283 $this->field_map[] = array( 284 'from_tablename' => 'forum_thread', 285 'from_fieldname' => 'time_update', 286 'to_type' => 'topic', 287 'to_fieldname' => '_bbp_last_active_time', 288 'callback_method' => 'callback_datetime' 280 289 ); 281 290 … … 592 601 593 602 /** 603 * Translate the topic sticky status type from PHPFox v3.5.x numeric's to WordPress's strings. 604 * 605 * @param int $status PHPFox v3.5.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'; // PHPFox Sticky 'topic_sticky = 1' 612 break; 613 614 case 0 : 615 default : 616 $status = 'normal'; // PHPFox Normal Topic 'topic_sticky = 0' 617 break; 618 } 619 return $status; 620 } 621 622 /** 594 623 * Verify the topic/reply count. 595 624 *
Note: See TracChangeset
for help on using the changeset viewer.