svalavuo 4 giorni fa
parent
commit
6639395de9
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2 3
      includes/wordpress_import.php

+ 2 - 3
includes/wordpress_import.php

@@ -317,14 +317,13 @@ class WordPressImport {
             
             if (!empty($postIds)) {
                 $placeholders = str_repeat('?,', count($postIds) - 1) . '?';
-                $categoriesStmt = $this->wpDb->prepare("
+                $categoriesStmt = $this->wpDb->query("
                     SELECT tr.object_id as post_id, t.name as category_name
                     FROM wp_term_relationships tr
                     JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
                     JOIN wp_terms t ON tt.term_id = t.term_id
                     WHERE tt.taxonomy = 'category' AND tr.object_id IN ($placeholders)
-                ");
-                $categoriesStmt->execute($postIds);
+                ", $postIds);
                 
                 foreach ($categoriesStmt->fetchAll() as $cat) {
                     $categoriesMap[$cat['post_id']][] = $cat['category_name'];