|
@@ -452,10 +452,14 @@ class WordPressImport {
|
|
|
$this->log("Placeholders: " . $placeholders);
|
|
$this->log("Placeholders: " . $placeholders);
|
|
|
$this->log("Parameter count: " . count($postIds));
|
|
$this->log("Parameter count: " . count($postIds));
|
|
|
$this->log("Executing publication mapping query with " . count($postIds) . " post IDs");
|
|
$this->log("Executing publication mapping query with " . count($postIds) . " post IDs");
|
|
|
- $pubStmt = $this->targetDb->query("
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // Use raw PDO for this query to avoid Database class parameter issues
|
|
|
|
|
+ $pdo = $this->targetDb->getConnection();
|
|
|
|
|
+ $pubStmt = $pdo->prepare("
|
|
|
SELECT id, wp_post_id FROM publications
|
|
SELECT id, wp_post_id FROM publications
|
|
|
WHERE wp_post_id IN ($placeholders)
|
|
WHERE wp_post_id IN ($placeholders)
|
|
|
- ", $postIds);
|
|
|
|
|
|
|
+ ");
|
|
|
|
|
+ $pubStmt->execute($postIds);
|
|
|
|
|
|
|
|
foreach ($pubStmt->fetchAll() as $pub) {
|
|
foreach ($pubStmt->fetchAll() as $pub) {
|
|
|
// Map WordPress post ID to publication ID
|
|
// Map WordPress post ID to publication ID
|