Browse Source

fix wp import

svalavuo 4 days ago
parent
commit
68260563ba
1 changed files with 2 additions and 6 deletions
  1. 2 6
      includes/wordpress_import.php

+ 2 - 6
includes/wordpress_import.php

@@ -421,14 +421,10 @@ class WordPressImport {
             
             if (!empty($postIds)) {
                 $placeholders = str_repeat('?,', count($postIds) - 1) . '?';
-                $pubStmt = $this->targetDb->prepare("
+                $pubStmt = $this->targetDb->query("
                     SELECT id, slug, title FROM publications 
                     WHERE slug IN ($placeholders) OR title IN ($placeholders)
-                ");
-                
-                // Duplicate the post IDs for slug and title matching
-                $allParams = array_merge($postIds, $postIds);
-                $pubStmt->execute($allParams);
+                ", array_merge($postIds, $postIds));
                 
                 foreach ($pubStmt->fetchAll() as $pub) {
                     // Map both slug and title for easier lookup