Changeset 5544
- Timestamp:
- 10/10/2014 06:44:33 AM (10 years ago)
- Location:
- trunk/src/includes/admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converter.php
r5543 r5544 1572 1572 1573 1573 /** 1574 * Check if the topic or reply author is anonymous 1575 * 1576 * @since (r5544) 1577 * 1578 * @param string $field 1579 * @return string 1580 */ 1581 private function callback_check_anonymous( $field ) { 1582 1583 if ( $this->callback_userid( $field ) == 0 ) { 1584 $field = 'true'; 1585 } else { 1586 $field = 'false'; 1587 } 1588 1589 return $field; 1590 } 1591 1592 /** 1574 1593 * A mini cache system to reduce database calls map topics ID's to forum ID's 1575 1594 * -
trunk/src/includes/admin/converters/Drupal7.php
r5541 r5544 657 657 return $count; 658 658 } 659 660 /**661 * Check the anonymous topic or reply status662 *663 * @since (r5539)664 *665 * @param int $status Drupal v7.x anonymous topic/reply status666 * @return string WordPress safe667 */668 public function callback_check_anonymous( $status = 0 ) {669 if ( $status == 0 ) {670 $status = 'true';671 } else {672 $status = 'false';673 }674 return $status;675 }676 659 } -
trunk/src/includes/admin/converters/SMF.php
r5539 r5544 678 678 $count = absint( (int) $count - 1 ); 679 679 return $count; 680 }681 682 /**683 * Check the anonymous topic or reply status684 *685 * @since (r5539)686 *687 * @param int $status SMF v2.x anonymous topic/reply status688 * @return string WordPress safe689 */690 public function callback_check_anonymous( $status = 0 ) {691 if ( $status == 0 ) {692 $status = 'true';693 } else {694 $status = 'false';695 }696 return $status;697 680 } 698 681 -
trunk/src/includes/admin/converters/Vanilla.php
r5542 r5544 576 576 $count = absint( (int) $count - 1 ); 577 577 return $count; 578 }579 580 /**581 * Check the anonymous topic or reply status.582 *583 * This method checks each imported topic or reply if the author user ID584 * was imported to determine if the topic or reply author is anonymous as585 * Vanilla v2.x does not store a topic or reply status for deleted users.586 *587 * @since (r5541)588 *589 * @param string $is_user_anonymous Vanilla v2.x numeric topic status590 * @return string WordPress safe591 */592 public function callback_check_anonymous( $is_user_anonymous = 0 ) {593 if ( !empty( $this->sync_table ) ) {594 $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%d" LIMIT 1', $is_user_anonymous ) );595 } else {596 $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT meta_value FROM ' . $this->wpdb->usermeta . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%d" LIMIT 1', $is_user_anonymous ) );597 }598 599 // An imported user ID exists therefore the topic/reply is not anonymous600 if ( !is_null( $row ) ) {601 $is_user_anonymous = 'false';602 // No imported user ID there the topic/reply is anonymous603 } else {604 $is_user_anonymous = 'true';605 }606 607 return $is_user_anonymous;608 578 } 609 579 -
trunk/src/includes/admin/converters/phpBB.php
r5539 r5544 826 826 827 827 /** 828 * Check the anonymous topic or reply status829 *830 * @since (r5539)831 *832 * @param int $status phpBB v3.x anonymous topic/reply status833 * @return string WordPress safe834 */835 public function callback_check_anonymous( $status = 0 ) {836 if ( $status == 1 ) {837 $status = 'true';838 } else {839 $status = 'false';840 }841 return $status;842 }843 844 /**845 828 * This callback processes any custom parser.php attributes and custom code with preg_replace 846 829 */
Note: See TracChangeset
for help on using the changeset viewer.