Commit 47d891b1 authored by Benni Mack's avatar Benni Mack
Browse files

Merge branch 'feature/bugfix-extensionkey-removal' into 'develop'

[BUGFIX] Ensure extension key is only registered once

See merge request t3o/ter!533
parents 1adbea4b 69887af5
Pipeline #9286 passed with stages
in 10 minutes and 52 seconds
......@@ -110,14 +110,8 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
'description' => '',
];
// Register the extension key at ter server, if successfull, add it to the extension table
// Register the extension key at ter server, if successful, redirect
if ($this->terConnection->registerExtension($extensionData)) {
// Create extension model
$extension = $this->objectManager->get(\T3o\TerFe2\Domain\Model\Extension::class);
$extension->setExtKey($extensionKey);
$extension->setFrontendUser($this->frontendUser['username']);
$this->extensionRepository->add($extension);
$this->addFlashMessage(
'',
$this->translate('registerkey.key_registered'),
......
......@@ -48,7 +48,7 @@ class CombinedExtensionRepository
foreach ($extensionKeys as $extensionKey) {
$keysQueryBuilder = $this->getQueryBuilder('tx_terfe2_domain_model_extension');
$extensionKeyRow = $keysQueryBuilder
->select('uid', 'frontend_user', 'downloadcounter', 'external_manual')
->select('uid', 'frontend_user', 'downloads', 'external_manual')
->from('tx_terfe2_domain_model_extension')
->where(
$keysQueryBuilder->expr()->eq('ext_key', $keysQueryBuilder->createNamedParameter($extensionKey))
......
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