Commit 183a6d17 authored by Andreas Wolf's avatar Andreas Wolf
Browse files

Merge branch 'issue-277-fixes' into 'develop'

#277: Wrong statement usage in import from queue

See merge request t3o/ter!274
parents 322e9cb9 f304285e
Pipeline #2834 passed with stages
in 4 minutes and 15 seconds
...@@ -195,7 +195,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -195,7 +195,7 @@ class ImportExtensionsFromQueueTask extends Task
->execute(); ->execute();
$statement->execute(); $statement->execute();
return $statement->fetch(\PDO::FETCH_ASSOC); return $statement->fetchColumn(0) > 0;
} }
/** /**
...@@ -249,7 +249,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -249,7 +249,7 @@ class ImportExtensionsFromQueueTask extends Task
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName); $queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertExtension)->execute()->execute(); $queryBuilder->insert($tableName)->values($insertExtension)->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName); return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
} }
...@@ -327,7 +327,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -327,7 +327,7 @@ class ImportExtensionsFromQueueTask extends Task
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName); $queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertVersion)->execute()->execute(); $queryBuilder->insert($tableName)->values($insertVersion)->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName); return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
} }
...@@ -354,7 +354,6 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -354,7 +354,6 @@ class ImportExtensionsFromQueueTask extends Task
->where( ->where(
$queryBuilder->expr()->eq('uid', $extUid) $queryBuilder->expr()->eq('uid', $extUid)
) )
->execute()
->execute(); ->execute();
} }
...@@ -409,8 +408,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -409,8 +408,7 @@ class ImportExtensionsFromQueueTask extends Task
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tx_terfe2_domain_model_relation'); ->getQueryBuilderForTable('tx_terfe2_domain_model_relation');
$queryBuilder->insert('tx_terfe2_domain_model_relation')->values($insertRelation) $queryBuilder->insert('tx_terfe2_domain_model_relation')->values($insertRelation)->execute();
->execute()->execute();
} }
} }
...@@ -423,7 +421,6 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -423,7 +421,6 @@ class ImportExtensionsFromQueueTask extends Task
->where( ->where(
$queryBuilder->expr()->eq('uid', $versionUid) $queryBuilder->expr()->eq('uid', $versionUid)
) )
->execute()
->execute(); ->execute();
} }
...@@ -519,8 +516,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -519,8 +516,7 @@ class ImportExtensionsFromQueueTask extends Task
$tableName = 'tx_terfe2_domain_model_author'; $tableName = 'tx_terfe2_domain_model_author';
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName); $queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertAuthor) $queryBuilder->insert($tableName)->values($insertAuthor)->execute();
->execute()->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName); return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment