|
|
@@ -477,8 +477,8 @@ class WordPressImport {
|
|
|
|
|
|
// Insert comment
|
|
|
$this->targetDb->query(
|
|
|
- "INSERT INTO comments (publication_id, parent_id, name, email, content, status, created_at, admin_reply)
|
|
|
- VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
|
|
+ "INSERT INTO comments (publication_id, parent_id, name, email, content, status, created_at, admin_reply, wp_comment_id)
|
|
|
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
|
|
[
|
|
|
$publicationId,
|
|
|
$parentId,
|
|
|
@@ -487,18 +487,13 @@ class WordPressImport {
|
|
|
$wpComment['comment_content'],
|
|
|
$status,
|
|
|
$wpComment['comment_date'],
|
|
|
- false
|
|
|
+ false,
|
|
|
+ $wpComment['comment_ID']
|
|
|
]
|
|
|
);
|
|
|
|
|
|
$commentId = $this->targetDb->getConnection()->lastInsertId();
|
|
|
|
|
|
- // Store WordPress comment ID for parent mapping
|
|
|
- $this->targetDb->query(
|
|
|
- "UPDATE comments SET wp_comment_id = ? WHERE id = ?",
|
|
|
- [$wpComment['comment_ID'], $commentId]
|
|
|
- );
|
|
|
-
|
|
|
$imported++;
|
|
|
$this->log("Successfully imported comment: '{$wpComment['comment_content']}' (ID: {$wpComment['comment_ID']})");
|
|
|
|