Changeset 5349
- Timestamp:
- 05/15/2014 04:30:55 AM (11 years ago)
- Location:
- trunk/src/includes/admin/converters
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converters/AEF.php
r5170 r5349 362 362 ); 363 363 364 // Reply title.365 // Note: We join the 'topics' table because 'posts' table does not include reply title.366 $this->field_map[] = array(367 'from_tablename' => 'topics',368 'from_fieldname' => 'topic',369 'join_tablename' => 'posts',370 'join_type' => 'INNER',371 'join_expression' => 'ON topics.tid = posts.post_tid WHERE topics.first_post_id != posts.pid',372 'to_type' => 'reply',373 'to_fieldname' => 'post_title',374 'callback_method' => 'callback_reply_title'375 );376 377 // Reply slug (Clean name to avoid conflicts)378 // Note: We join the 'topics' table because 'posts' table does not include reply slug.379 $this->field_map[] = array(380 'from_tablename' => 'topics',381 'from_fieldname' => 'topic',382 'join_tablename' => 'posts',383 'join_type' => 'INNER',384 'join_expression' => 'ON topics.tid = posts.post_tid WHERE topics.first_post_id != posts.pid',385 'to_type' => 'reply',386 'to_fieldname' => 'post_name',387 'callback_method' => 'callback_slug'388 );389 390 364 // Reply content. 391 365 $this->field_map[] = array( … … 678 652 return $count; 679 653 } 680 681 /**682 * Set the reply title683 *684 * @param string $title AEF v1.0.9 topic title of this reply685 * @return string Prefixed topic title, or empty string686 */687 public function callback_reply_title( $title = '' ) {688 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';689 return $title;690 }691 654 } -
trunk/src/includes/admin/converters/Drupal7.php
r5264 r5349 359 359 ); 360 360 361 // Reply title.362 $this->field_map[] = array(363 'from_tablename' => 'comment',364 'from_fieldname' => 'subject',365 'to_type' => 'reply',366 'to_fieldname' => 'post_title'367 );368 369 // Reply slug (Clean name to avoid conflicts)370 $this->field_map[] = array(371 'from_tablename' => 'comment',372 'from_fieldname' => 'subject',373 'to_type' => 'reply',374 'to_fieldname' => 'post_name',375 'callback_method' => 'callback_slug'376 );377 378 361 // Reply content. 379 362 // Note: We join the 'field_data_comment_body' table because 'comment' table does not include reply content. -
trunk/src/includes/admin/converters/Example.php
r5176 r5349 225 225 ); 226 226 227 // Topic status (Open or Closed) 228 $this->field_map[] = array( 229 'from_tablename' => 'topics_table', 230 'from_fieldname' => 'the_topic_status', 231 'to_type' => 'topic', 232 'to_fieldname' => 'post_status', 233 'callback_method' => 'callback_topic_status' 234 ); 235 227 236 // Topic parent forum id (If no parent, then 0) 228 237 $this->field_map[] = array( … … 394 403 ); 395 404 396 // Reply title. 397 $this->field_map[] = array( 398 'from_tablename' => 'replies_table', 399 'from_fieldname' => 'the_reply_title', 400 'to_type' => 'reply', 401 'to_fieldname' => 'post_title' 402 ); 403 404 // Reply slug (Clean name to avoid conflicts) 405 $this->field_map[] = array( 406 'from_tablename' => 'replies_table', 407 'from_fieldname' => 'the_reply_slug', 408 'to_type' => 'reply', 409 'to_fieldname' => 'post_name', 410 'callback_method' => 'callback_slug' 411 ); 405 // Reply title and reply slugs 406 // Note: We don't actually want either a reply title or a reply slug as 407 // we want single replies to use their ID as the permalink. 412 408 413 409 // Reply content. -
trunk/src/includes/admin/converters/FluxBB.php
r5170 r5349 329 329 ); 330 330 331 // Reply title.332 // Note: We join the 'topics' table because 'posts' table does not include reply title.333 $this->field_map[] = array(334 'from_tablename' => 'topics',335 'from_fieldname' => 'subject',336 'join_tablename' => 'posts',337 'join_type' => 'INNER',338 'join_expression' => 'ON topics.id = posts.topic_id WHERE topics.first_post_id != posts.id',339 'to_type' => 'reply',340 'to_fieldname' => 'post_title',341 'callback_method' => 'callback_reply_title'342 );343 344 // Reply slug (Clean name to avoid conflicts)345 // Note: We join the 'topics' table because 'posts' table does not include slug title.346 $this->field_map[] = array(347 'from_tablename' => 'topics',348 'from_fieldname' => 'subject',349 'join_tablename' => 'posts',350 'join_type' => 'INNER',351 'join_expression' => 'ON topics.id = posts.topic_id WHERE topics.first_post_id != posts.id',352 'to_type' => 'reply',353 'to_fieldname' => 'post_name',354 'callback_method' => 'callback_slug'355 );356 357 331 // Reply content. 358 332 $this->field_map[] = array( … … 633 607 return $count; 634 608 } 635 636 /**637 * Set the reply title638 *639 * @param string $title FluxBB v1.5.3 topic title of this reply640 * @return string Prefixed topic title, or empty string641 */642 public function callback_reply_title( $title = '' ) {643 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';644 return $title;645 }646 609 } -
trunk/src/includes/admin/converters/Invision.php
r5170 r5349 325 325 ); 326 326 327 // Reply title.328 // Note: We join the topics table because post table does not include topic title.329 $this->field_map[] = array(330 'from_tablename' => 'topics',331 'from_fieldname' => 'title',332 'join_tablename' => 'posts',333 'join_type' => 'INNER',334 'join_expression' => 'ON (topics.tid = posts.topic_id) WHERE posts.new_topic = 0',335 'to_type' => 'reply',336 'to_fieldname' => 'post_title',337 'callback_method' => 'callback_reply_title'338 );339 340 327 // Reply content. 341 328 $this->field_map[] = array( … … 514 501 $count = absint( (int) $count - 1 ); 515 502 return $count; 516 }517 518 /**519 * Set the reply title520 *521 * @param string $title Invision topic title of this reply522 * @return string Prefixed topic title, or empty string523 */524 public function callback_reply_title( $title = '' ) {525 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';526 return $title;527 503 } 528 504 -
trunk/src/includes/admin/converters/Kunena1.php
r5145 r5349 318 318 'to_fieldname' => 'post_author', 319 319 'callback_method' => 'callback_userid' 320 );321 322 // Reply title.323 $this->field_map[] = array(324 'from_tablename' => 'kunena_messages',325 'from_fieldname' => 'subject',326 'to_type' => 'reply',327 'to_fieldname' => 'post_title',328 'callback_method' => 'callback_reply_title'329 );330 331 // Reply slug (Clean name to avoid conflicts)332 $this->field_map[] = array(333 'from_tablename' => 'kunena_messages',334 'from_fieldname' => 'subject',335 'to_type' => 'reply',336 'to_fieldname' => 'post_name',337 'callback_method' => 'callback_slug'338 320 ); 339 321 … … 533 515 return $status; 534 516 } 535 536 /**537 * Set the reply title538 *539 * @param string $title Kunena v1.x topic title of this reply540 * @return string Prefixed topic title, or empty string541 */542 public function callback_reply_title( $title = '' ) {543 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';544 return $title;545 }546 517 } -
trunk/src/includes/admin/converters/Kunena2.php
r5145 r5349 337 337 'to_fieldname' => 'post_author', 338 338 'callback_method' => 'callback_userid' 339 );340 341 // Reply title.342 $this->field_map[] = array(343 'from_tablename' => 'kunena_messages',344 'from_fieldname' => 'subject',345 'to_type' => 'reply',346 'to_fieldname' => 'post_title',347 'callback_method' => 'callback_reply_title'348 );349 350 // Reply slug (Clean name to avoid conflicts)351 $this->field_map[] = array(352 'from_tablename' => 'kunena_messages',353 'from_fieldname' => 'subject',354 'to_type' => 'reply',355 'to_fieldname' => 'post_name',356 'callback_method' => 'callback_slug'357 339 ); 358 340 … … 575 557 return $count; 576 558 } 577 578 /**579 * Set the reply title580 *581 * @param string $title Kunena v2.x topic title of this reply582 * @return string Prefixed topic title, or empty string583 */584 public function callback_reply_title( $title = '' ) {585 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';586 return $title;587 }588 559 } -
trunk/src/includes/admin/converters/Kunena3.php
r5145 r5349 338 338 ); 339 339 340 // Reply title.341 $this->field_map[] = array(342 'from_tablename' => 'kunena_messages',343 'from_fieldname' => 'subject',344 'to_type' => 'reply',345 'to_fieldname' => 'post_title',346 'callback_method' => 'callback_reply_title'347 );348 349 // Reply slug (Clean name to avoid conflicts)350 $this->field_map[] = array(351 'from_tablename' => 'kunena_messages',352 'from_fieldname' => 'subject',353 'to_type' => 'reply',354 'to_fieldname' => 'post_name',355 'callback_method' => 'callback_slug'356 );357 358 340 // Reply content. 359 341 // Note: We join the 'kunena_messages_text' table because 'kunena_messages' table does not include reply content. … … 802 784 return $count; 803 785 } 804 805 /**806 * Set the reply title807 *808 * @param string $title Kunena v3.x topic title of this reply809 * @return string Prefixed topic title, or empty string810 */811 public function callback_reply_title( $title = '' ) {812 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';813 return $title;814 }815 786 } -
trunk/src/includes/admin/converters/Mingle.php
r5170 r5349 267 267 'to_fieldname' => 'post_author', 268 268 'callback_method' => 'callback_userid' 269 );270 271 // Reply title.272 $this->field_map[] = array(273 'from_tablename' => 'forum_posts',274 'from_fieldname' => 'subject',275 'to_type' => 'reply',276 'to_fieldname' => 'post_title'277 );278 279 // Reply slug (Clean name to avoid conflicts)280 $this->field_map[] = array(281 'from_tablename' => 'forum_posts',282 'from_fieldname' => 'subject',283 'to_type' => 'reply',284 'to_fieldname' => 'post_name',285 'callback_method' => 'callback_slug'286 269 ); 287 270 … … 480 463 return html_entity_decode( $bbcode->Parse( $field ) ); 481 464 } 482 483 465 } -
trunk/src/includes/admin/converters/MyBB.php
r5170 r5349 317 317 ); 318 318 319 // Reply title.320 $this->field_map[] = array(321 'from_tablename' => 'posts',322 'from_fieldname' => 'subject',323 'to_type' => 'reply',324 'to_fieldname' => 'post_title'325 );326 327 // Reply slug (Clean name to avoid conflicts)328 $this->field_map[] = array(329 'from_tablename' => 'posts',330 'from_fieldname' => 'subject',331 'to_type' => 'reply',332 'to_fieldname' => 'post_name',333 'callback_method' => 'callback_slug'334 );335 336 319 // Reply content. 337 320 $this->field_map[] = array( … … 588 571 return $count; 589 572 } 590 591 573 } -
trunk/src/includes/admin/converters/PHPFox3.php
r5176 r5349 365 365 ); 366 366 367 // Reply title.368 $this->field_map[] = array(369 'from_tablename' => 'forum_thread',370 'from_fieldname' => 'title',371 'join_tablename' => 'forum_post',372 'join_type' => 'LEFT',373 'join_expression' => 'USING (thread_id)',374 'to_type' => 'reply',375 'to_fieldname' => 'post_title',376 'callback_method' => 'callback_reply_title'377 );378 379 // Reply slug (Clean name to avoid conflicts)380 $this->field_map[] = array(381 'from_tablename' => 'forum_thread',382 'from_fieldname' => 'title_url',383 'join_tablename' => 'forum_post',384 'join_type' => 'LEFT',385 'join_expression' => 'USING (thread_id)',386 'to_type' => 'reply',387 'to_fieldname' => 'post_name',388 'callback_method' => 'callback_slug'389 );390 391 367 // Reply content. 392 368 // Note: We join the 'forum_post_text' table because 'forum_post' table does not include content. … … 639 615 return $count; 640 616 } 641 642 /**643 * Set the reply title644 *645 * @param string $title PHPFox v3.5.x topic title of this reply646 * @return string Prefixed topic title, or empty string647 */648 public function callback_reply_title( $title = '' ) {649 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';650 return $title;651 }652 617 } -
trunk/src/includes/admin/converters/PHPWind.php
r5143 r5349 345 345 ); 346 346 347 // Reply title.348 // Note: We join the 'bbs_threads' table because 'bbs_posts' table does not include reply title.349 $this->field_map[] = array(350 'from_tablename' => 'bbs_threads',351 'from_fieldname' => 'subject',352 'join_tablename' => 'bbs_posts',353 'join_type' => 'LEFT',354 'join_expression' => 'USING (tid)',355 'to_type' => 'reply',356 'to_fieldname' => 'post_title'357 );358 359 // Reply slug (Clean name to avoid conflicts)360 // Note: We join the 'bbs_threads' table because 'bbs_posts' table does not include reply slug.361 $this->field_map[] = array(362 'from_tablename' => 'bbs_threads',363 'from_fieldname' => 'subject',364 'join_tablename' => 'bbs_posts',365 'join_type' => 'LEFT',366 'join_expression' => 'USING (tid)',367 'to_type' => 'reply',368 'to_fieldname' => 'post_name',369 'callback_method' => 'callback_slug'370 );371 372 347 // Reply content. 373 348 $this->field_map[] = array( -
trunk/src/includes/admin/converters/Phorum.php
r5142 r5349 311 311 ); 312 312 313 // Reply title.314 $this->field_map[] = array(315 'from_tablename' => 'messages',316 'from_fieldname' => 'subject',317 'to_type' => 'reply',318 'to_fieldname' => 'post_title'319 );320 321 // Reply slug (Clean name to avoid conflicts)322 $this->field_map[] = array(323 'from_tablename' => 'messages',324 'from_fieldname' => 'subject',325 'to_type' => 'reply',326 'to_fieldname' => 'post_name',327 'callback_method' => 'callback_slug'328 );329 330 313 // Reply content. 331 314 $this->field_map[] = array( … … 542 525 return $count; 543 526 } 544 545 527 } -
trunk/src/includes/admin/converters/PunBB.php
r5170 r5349 332 332 ); 333 333 334 // Reply title.335 // Note: We join the 'topics' table because 'posts' table does not have topic subject.336 $this->field_map[] = array(337 'from_tablename' => 'topics',338 'from_fieldname' => 'subject',339 'join_tablename' => 'posts',340 'join_type' => 'LEFT',341 'join_expression' => 'ON topics.id = posts.topic_id WHERE topics.first_post_id != posts.id',342 'to_type' => 'reply',343 'to_fieldname' => 'post_title',344 'callback_method' => 'callback_reply_title'345 );346 347 // Reply slug (Clean name to avoid conflicts)348 // Note: We join the 'topics' table because 'posts' table does not have topic subject.349 $this->field_map[] = array(350 'from_tablename' => 'topics',351 'from_fieldname' => 'subject',352 'join_tablename' => 'posts',353 'join_type' => 'LEFT',354 'join_expression' => 'ON topics.id = posts.topic_id WHERE topics.first_post_id != posts.id',355 'to_type' => 'reply',356 'to_fieldname' => 'post_name',357 'callback_method' => 'callback_slug'358 );359 360 334 // Reply content. 361 335 $this->field_map[] = array( … … 667 641 return $count; 668 642 } 669 670 /**671 * Set the reply title672 *673 * @param string $title PunBB v1.4.2 topic title of this reply674 * @return string Prefixed topic title, or empty string675 */676 public function callback_reply_title( $title = '' ) {677 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';678 return $title;679 }680 643 } -
trunk/src/includes/admin/converters/SMF.php
r5332 r5349 356 356 ); 357 357 358 // Reply title.359 $this->field_map[] = array(360 'from_tablename' => 'messages',361 'from_fieldname' => 'subject',362 'to_type' => 'reply',363 'to_fieldname' => 'post_title',364 'callback_method' => 'callback_reply_title'365 );366 367 // Reply slug (Clean name to avoid conflicts)368 $this->field_map[] = array(369 'from_tablename' => 'messages',370 'from_fieldname' => 'subject',371 'to_type' => 'reply',372 'to_fieldname' => 'post_name',373 'callback_method' => 'callback_slug'374 );375 376 358 // Reply content. 377 359 $this->field_map[] = array( … … 645 627 $count = absint( (int) $count - 1 ); 646 628 return $count; 647 }648 649 /**650 * Set the reply title651 *652 * @param string $title SMF v2.0.4 topic title of this reply653 * @return string Prefixed topic title, or empty string654 */655 public function callback_reply_title( $title = '' ) {656 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';657 return $title;658 629 } 659 630 -
trunk/src/includes/admin/converters/SimplePress5.php
r5170 r5349 307 307 ); 308 308 309 // Reply title.310 // Note: We join the sftopics table because sfposts table does not include topic title.311 $this->field_map[] = array(312 'from_tablename' => 'sftopics',313 'from_fieldname' => 'topic_name',314 'join_tablename' => 'sfposts',315 'join_type' => 'LEFT',316 'join_expression' => 'USING (topic_id) WHERE sfposts.post_index != 1',317 'to_type' => 'reply',318 'to_fieldname' => 'post_title',319 'callback_method' => 'callback_reply_title'320 );321 322 // Reply slug (Clean name to avoid conflicts)323 // Note: We join the sftopics table because sfposts table does not include topic title.324 $this->field_map[] = array(325 'from_tablename' => 'sftopics',326 'from_fieldname' => 'topic_name',327 'join_tablename' => 'sfposts',328 'join_type' => 'LEFT',329 'join_expression' => 'USING (topic_id) WHERE sfposts.post_index != 1',330 'to_type' => 'reply',331 'to_fieldname' => 'post_name',332 'callback_method' => 'callback_slug'333 );334 335 309 // Reply content. 336 310 $this->field_map[] = array( … … 526 500 $count = absint( (int) $count - 1 ); 527 501 return $count; 528 }529 530 /**531 * Set the reply title532 *533 * @param string $title Simple:Press v5.x topic title of this reply534 * @return string Prefixed topic title, or empty string535 */536 public function callback_reply_title( $title = '' ) {537 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';538 return $title;539 502 } 540 503 -
trunk/src/includes/admin/converters/Vanilla.php
r5149 r5349 327 327 ); 328 328 329 // Reply title.330 // Note: We join the Discussion table because Comment table does not include topic title.331 $this->field_map[] = array(332 'from_tablename' => 'Discussion',333 'from_fieldname' => 'Name',334 'join_tablename' => 'Comment',335 'join_type' => 'INNER',336 'join_expression' => 'USING (DiscussionID)',337 'to_type' => 'reply',338 'to_fieldname' => 'post_title',339 'callback_method' => 'callback_reply_title'340 );341 342 // Reply slug (Clean name to avoid conflicts)343 // Note: We join the Discussion table because Comment table does not include topic title.344 $this->field_map[] = array(345 'from_tablename' => 'Discussion',346 'from_fieldname' => 'Name',347 'join_tablename' => 'Comment',348 'join_type' => 'INNER',349 'join_expression' => 'USING (DiscussionID)',350 'to_type' => 'reply',351 'to_fieldname' => 'post_name',352 'callback_method' => 'callback_slug'353 );354 355 329 // Reply author ip (Stored in postmeta) 356 330 $this->field_map[] = array( … … 524 498 $count = absint( (int) $count - 1 ); 525 499 return $count; 526 }527 528 /**529 * Set the reply title530 *531 * @param string $title Vanilla v2.x topic title of this reply532 * @return string Prefixed topic title, or empty string533 */534 public function callback_reply_title( $title = '' ) {535 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';536 return $title;537 500 } 538 501 -
trunk/src/includes/admin/converters/XMB.php
r5170 r5349 366 366 ); 367 367 368 // Reply title.369 // Note: We join the 'threads' table because 'posts' table does not have topic title.370 $this->field_map[] = array(371 'from_tablename' => 'threads',372 'from_fieldname' => 'subject',373 'join_tablename' => 'posts',374 'join_type' => 'INNER',375 'join_expression' => 'USING (tid) WHERE posts.subject = ""',376 'to_type' => 'reply',377 'to_fieldname' => 'post_title',378 'callback_method' => 'callback_reply_title'379 );380 381 // Reply slug (Clean name to avoid conflicts)382 // Note: We join the 'threads' table because 'posts' table does not have topic title.383 $this->field_map[] = array(384 'from_tablename' => 'threads',385 'from_fieldname' => 'subject',386 'join_tablename' => 'posts',387 'join_type' => 'INNER',388 'join_expression' => 'USING (tid) WHERE posts.subject = ""',389 'to_type' => 'reply',390 'to_fieldname' => 'post_name',391 'callback_method' => 'callback_slug'392 );393 394 368 // Reply content. 395 369 $this->field_map[] = array( … … 695 669 return $count; 696 670 } 697 698 /**699 * Set the reply title700 *701 * @param string $title XMB v1.9.11.13 topic title of this reply702 * @return string Prefixed topic title, or empty string703 */704 public function callback_reply_title( $title = '' ) {705 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';706 return $title;707 }708 709 671 } -
trunk/src/includes/admin/converters/XenForo.php
r5170 r5349 350 350 'to_fieldname' => 'post_author', 351 351 'callback_method' => 'callback_userid' 352 );353 354 // Reply title.355 // Note: We join the 'thread' table because 'post' do not have titles.356 $this->field_map[] = array(357 'from_tablename' => 'thread',358 'from_fieldname' => 'title',359 'join_tablename' => 'post',360 'join_type' => 'LEFT',361 'join_expression' => 'USING (thread_id) WHERE thread.first_post_id != post.post_id',362 'to_type' => 'reply',363 'to_fieldname' => 'post_title',364 'callback_method' => 'callback_reply_title'365 );366 367 // Reply slug (Clean name to avoid conflicts)368 // Note: We join the 'thread' table because 'post' do not have titles.369 $this->field_map[] = array(370 'from_tablename' => 'thread',371 'from_fieldname' => 'title',372 'join_tablename' => 'post',373 'join_type' => 'LEFT',374 'join_expression' => 'USING (thread_id) WHERE thread.first_post_id != post.post_id',375 'to_fieldname' => 'post_name',376 'callback_method' => 'callback_slug'377 352 ); 378 353 … … 712 687 return $count; 713 688 } 714 715 /**716 * Set the reply title717 *718 * @param string $title XenForo topic title of this reply719 * @return string Prefixed topic title, or empty string720 */721 public function callback_reply_title( $title = '' ) {722 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';723 return $title;724 }725 689 } -
trunk/src/includes/admin/converters/bbPress1.php
r5176 r5349 365 365 ); 366 366 367 // Reply title.368 // Note: We join the 'topics' table because 'posts' table does not include topic title.369 $this->field_map[] = array(370 'from_tablename' => 'topics',371 'from_fieldname' => 'topic_title',372 'join_tablename' => 'posts',373 'join_type' => 'INNER',374 'join_expression' => 'USING (topic_id) WHERE posts.post_position NOT IN (0,1)',375 'to_type' => 'reply',376 'to_fieldname' => 'post_title',377 'callback_method' => 'callback_reply_title'378 );379 380 // Reply slug (Clean name to avoid conflicts)381 // Note: We join the 'topics' table because 'posts' table does not include topic slug.382 $this->field_map[] = array(383 'from_tablename' => 'topics',384 'from_fieldname' => 'topic_slug',385 'join_tablename' => 'posts',386 'join_type' => 'INNER',387 'join_expression' => 'USING (topic_id) WHERE posts.post_position NOT IN (0,1)',388 'to_type' => 'reply',389 'to_fieldname' => 'post_name',390 'callback_method' => 'callback_slug'391 );392 393 367 // Reply author ip (Stored in postmeta) 394 368 $this->field_map[] = array( … … 628 602 629 603 /** 630 * Set the reply title631 *632 * @param string $title bbPress 1.x topic title of this reply633 * @return string Prefixed topic title, or empty string634 */635 public function callback_reply_title( $title = '' ) {636 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';637 return $title;638 }639 640 /**641 604 * This method is to save the salt and password together. That 642 605 * way when we authenticate it we can get it out of the database -
trunk/src/includes/admin/converters/phpBB.php
r5170 r5349 358 358 'to_fieldname' => 'post_author', 359 359 'callback_method' => 'callback_userid' 360 );361 362 // Reply title.363 $this->field_map[] = array(364 'from_tablename' => 'posts',365 'from_fieldname' => 'post_subject',366 'to_type' => 'reply',367 'to_fieldname' => 'post_title',368 'callback_method' => 'callback_reply_title'369 );370 371 // Reply slug (Clean name to avoid conflicts)372 $this->field_map[] = array(373 'from_tablename' => 'posts',374 'from_fieldname' => 'post_subject',375 'to_type' => 'reply',376 'to_fieldname' => 'post_name',377 'callback_method' => 'callback_slug'378 360 ); 379 361 … … 808 790 809 791 /** 810 * Set the reply title811 *812 * @param string $title phpBB v3.x topic title of this reply813 * @return string Prefixed topic title, or empty string814 */815 public function callback_reply_title( $title = '' ) {816 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';817 return $title;818 }819 820 /**821 792 * This callback processes any custom parser.php attributes and custom code with preg_replace 822 793 */ -
trunk/src/includes/admin/converters/vBulletin.php
r5176 r5349 382 382 ); 383 383 384 // Reply title.385 // Note: We join the 'thread' table because 'post' table does not include reply title.386 $this->field_map[] = array(387 'from_tablename' => 'thread',388 'from_fieldname' => 'title',389 'join_tablename' => 'post',390 'join_type' => 'INNER',391 'join_expression' => 'USING (threadid) WHERE post.parentid != 0',392 'to_type' => 'reply',393 'to_fieldname' => 'post_title',394 'callback_method' => 'callback_reply_title'395 );396 397 // Reply slug (Clean name to avoid conflicts)398 // Note: We join the 'thread' table because 'post' table does not include reply slug.399 $this->field_map[] = array(400 'from_tablename' => 'thread',401 'from_fieldname' => 'title',402 'join_tablename' => 'post',403 'join_type' => 'INNER',404 'join_expression' => 'USING (threadid) WHERE post.parentid != 0',405 'to_type' => 'reply',406 'to_fieldname' => 'post_name',407 'callback_method' => 'callback_slug'408 );409 410 384 // Reply content. 411 385 $this->field_map[] = array( … … 641 615 $count = absint( (int) $count - 1 ); 642 616 return $count; 643 }644 645 /**646 * Set the reply title647 *648 * @param string $title vBulletin v4.x topic title of this reply649 * @return string Prefixed topic title, or empty string650 */651 public function callback_reply_title( $title = '' ) {652 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';653 return $title;654 617 } 655 618 -
trunk/src/includes/admin/converters/vBulletin3.php
r5176 r5349 382 382 ); 383 383 384 // Reply title.385 // Note: We join the 'thread' table because 'post' table does not include reply title.386 $this->field_map[] = array(387 'from_tablename' => 'thread',388 'from_fieldname' => 'title',389 'join_tablename' => 'post',390 'join_type' => 'INNER',391 'join_expression' => 'USING (threadid) WHERE post.parentid != 0',392 'to_type' => 'reply',393 'to_fieldname' => 'post_title',394 'callback_method' => 'callback_reply_title'395 );396 397 // Reply slug (Clean name to avoid conflicts)398 // Note: We join the 'thread' table because 'post' table does not include reply slug.399 $this->field_map[] = array(400 'from_tablename' => 'thread',401 'from_fieldname' => 'title',402 'join_tablename' => 'post',403 'join_type' => 'INNER',404 'join_expression' => 'USING (threadid) WHERE post.parentid != 0',405 'to_type' => 'reply',406 'to_fieldname' => 'post_name',407 'callback_method' => 'callback_slug'408 );409 410 384 // Reply content. 411 385 $this->field_map[] = array( … … 641 615 $count = absint( (int) $count - 1 ); 642 616 return $count; 643 }644 645 /**646 * Set the reply title647 *648 * @param string $title vBulletin v3.x topic title of this reply649 * @return string Prefixed topic title, or empty string650 */651 public function callback_reply_title( $title = '' ) {652 $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : '';653 return $title;654 617 } 655 618
Note: See TracChangeset
for help on using the changeset viewer.