Changeset 5544 for trunk/src/includes/admin/converters/Vanilla.php
- Timestamp:
- 10/10/2014 06:44:33 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.