|
@@ -421,14 +421,10 @@ class WordPressImport {
|
|
|
|
|
|
|
|
if (!empty($postIds)) {
|
|
if (!empty($postIds)) {
|
|
|
$placeholders = str_repeat('?,', count($postIds) - 1) . '?';
|
|
$placeholders = str_repeat('?,', count($postIds) - 1) . '?';
|
|
|
- $pubStmt = $this->targetDb->prepare("
|
|
|
|
|
|
|
+ $pubStmt = $this->targetDb->query("
|
|
|
SELECT id, slug, title FROM publications
|
|
SELECT id, slug, title FROM publications
|
|
|
WHERE slug IN ($placeholders) OR title IN ($placeholders)
|
|
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) {
|
|
foreach ($pubStmt->fetchAll() as $pub) {
|
|
|
// Map both slug and title for easier lookup
|
|
// Map both slug and title for easier lookup
|