Commit 06e42853 authored by Benni Mack's avatar Benni Mack
Browse files

[TASK] Remove unused PHP code in migration task

The two methods are never called and can be removed.
parent 1c7fffe3
Pipeline #9347 passed with stages
in 10 minutes and 1 second
......@@ -491,49 +491,6 @@ class ImportExtensionsFromQueueTask extends Task
return 0;
}
/**
* @param array $extData
*
* @return int $authorUid
*/
public function getAuthor($extData)
{
return $this->authorExists($extData);
}
/**
* @param array $extData
*
* @return int $authorUid
*/
public function authorExists($extData)
{
$tableName = 'tx_terfe2_domain_model_author';
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()->removeAll();
$statement = $queryBuilder
->select('uid')
->from($tableName)
->where(
$queryBuilder->expr()->eq('deleted', 0),
$queryBuilder->expr()->eq('username', $queryBuilder->createNamedParameter($extData['lastuploadbyusername'])),
$queryBuilder->expr()->eq('name', $queryBuilder->createNamedParameter($extData['authorname'])),
$queryBuilder->expr()->eq('email', $queryBuilder->createNamedParameter($extData['authoremail'])),
$queryBuilder->expr()->eq('company', $queryBuilder->createNamedParameter($extData['authorcompany']))
)
->execute();
$statement->execute();
$authorRec = $statement->fetch(\PDO::FETCH_ASSOC);
if ($authorRec['uid']) {
return $authorRec['uid'];
}
return $this->createAuthor($extData);
}
/**
* @param array $extData
*
......
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