diff --git a/boards/mybb/posts.php b/boards/mybb/posts.php index 13f0191..07c69df 100644 --- a/boards/mybb/posts.php +++ b/boards/mybb/posts.php @@ -75,6 +75,8 @@ function convert_data($data) $insert_data['username'] = $this->get_import->username($data['uid'], $data['username']); $insert_data['subject'] = encode_to_utf8($data['subject'], "posts", "posts"); $insert_data['message'] = encode_to_utf8($this->bbcode_parser->convert($data['message']), "posts", "posts"); + $insert_data['edituid'] = $this->get_import->uid($data['edituid']); + $insert_data['editreason'] = encode_to_utf8($data['editreason'], "posts", "posts"); return $insert_data; } diff --git a/boards/smf/posts.php b/boards/smf/posts.php index fadddc0..2a16898 100644 --- a/boards/smf/posts.php +++ b/boards/smf/posts.php @@ -79,15 +79,15 @@ function convert_data($data) } // Get edit name + $insert_data['edituid'] = 0; if(!empty($data['modifiedName'])) { - $query = $db->simple_select("users", "uid", "username='".$db->escape_string($data['modifiedName'])."'", array('limit' => 1)); - $insert_data['edituid'] = $db->fetch_field($query, "uid"); - $db->free_result($query); - } - else - { - $insert_data['edituid'] = 0; + $query = $this->old_db->simple_select('members', 'ID_MEMBER', "memberName='".$this->old_db->escape_string($data['modifiedName'])."'"); + if($this->old_db->num_rows($query) == 1) + { + $insert_data['edituid'] = $this->get_import->uid($this->old_db->fetch_field($query, 'ID_MEMBER')); + } + $this->old_db->free_result($query); } $insert_data['edittime'] = $data['modifiedTime']; diff --git a/boards/smf2/posts.php b/boards/smf2/posts.php index bd3fbc6..eb8adba 100644 --- a/boards/smf2/posts.php +++ b/boards/smf2/posts.php @@ -79,15 +79,15 @@ function convert_data($data) } // Get edit name + $insert_data['edituid'] = 0; if(!empty($data['modified_name'])) { - $query = $db->simple_select("users", "uid", "username='".$db->escape_string($data['modified_name'])."'", array('limit' => 1)); - $insert_data['edituid'] = $db->fetch_field($query, "uid"); - $db->free_result($query); - } - else - { - $insert_data['edituid'] = 0; + $query = $this->old_db->simple_select('members', 'id_member', "member_name='".$this->old_db->escape_string($data['modified_name'])."'"); + if($this->old_db->num_rows($query) == 1) + { + $insert_data['edituid'] = $this->get_import->uid($this->old_db->fetch_field($query, 'id_member')); + } + $this->old_db->free_result($query); } $insert_data['edittime'] = $data['modified_time'];