Commit 24de446c authored by Andreas Wolf's avatar Andreas Wolf

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

This reverts merge request !272
parent 67b863bb
Pipeline #2805 passed with stages
in 4 minutes and 23 seconds
......@@ -195,7 +195,7 @@ class ImportExtensionsFromQueueTask extends Task
->execute();
$statement->execute();
return $statement->fetchColumn(0) > 0;
return $statement->fetch(\PDO::FETCH_ASSOC);
}
/**
......@@ -249,7 +249,7 @@ class ImportExtensionsFromQueueTask extends Task
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertExtension)->execute();
$queryBuilder->insert($tableName)->values($insertExtension)->execute()->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
}
......@@ -327,7 +327,7 @@ class ImportExtensionsFromQueueTask extends Task
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertVersion)->execute();
$queryBuilder->insert($tableName)->values($insertVersion)->execute()->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
}
......@@ -354,6 +354,7 @@ class ImportExtensionsFromQueueTask extends Task
->where(
$queryBuilder->expr()->eq('uid', $extUid)
)
->execute()
->execute();
}
......@@ -408,7 +409,8 @@ class ImportExtensionsFromQueueTask extends Task
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tx_terfe2_domain_model_relation');
$queryBuilder->insert('tx_terfe2_domain_model_relation')->values($insertRelation)->execute();
$queryBuilder->insert('tx_terfe2_domain_model_relation')->values($insertRelation)
->execute()->execute();
}
}
......@@ -421,6 +423,7 @@ class ImportExtensionsFromQueueTask extends Task
->where(
$queryBuilder->expr()->eq('uid', $versionUid)
)
->execute()
->execute();
}
......@@ -516,7 +519,8 @@ class ImportExtensionsFromQueueTask extends Task
$tableName = 'tx_terfe2_domain_model_author';
$queryBuilder = $connectionPool->getQueryBuilderForTable($tableName);
$queryBuilder->insert($tableName)->values($insertAuthor)->execute();
$queryBuilder->insert($tableName)->values($insertAuthor)
->execute()->execute();
return $connectionPool->getConnectionForTable($tableName)->lastInsertId($tableName);
}
......
......@@ -44,14 +44,75 @@
<div class="tab-content">
<div class="tab-pane active" id="myextensions" role="tabpanel">
<f:if condition="{extensions -> f:count()} > 0">
<f:then>
<f:render section="extensionList" />
</f:then>
<f:else>
<p>You have not registered any extension keys.</p>
</f:else>
</f:if>
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">
<f:translate key="extensionKey" />
</th>
</tr>
</thead>
<tbody>
<f:for each="{extensions}" as="extension">
<tr>
<td>
<f:if condition="{extension.versionCount} < 1">
<f:then>
{extension.extKey}
</f:then>
<f:else>
<f:link.action pageUid="{settings.pages.extensionDetailPID}" controller="Extension" action="show" arguments="{extension : extension}">{extension.extKey}</f:link.action>
/ <span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
</f:else>
</f:if>
<br />
<small>
<f:if condition="{extension.versionCount} < 1">
<f:then>
<f:translate key="tx_terfe2_domain_model_extension.versions.no" />
</f:then>
<f:else>
<f:if condition="{extension.versionCount} > 1">
<f:then>
<f:translate key="tx_terfe2_domain_model_extension.versions.multiple" arguments="{0: extension.versionCount}" />
</f:then>
<f:else>
<f:translate key="tx_terfe2_domain_model_extension.versions.one" />
</f:else>
</f:if>
(last upload on <f:format.date format="m/d/Y h:i a (T)">{extension.lastVersion.uploadDate}</f:format.date>)
</f:else>
</f:if>
</small>
</td>
<td class="text-right">
<f:if condition="{extension.versionCount} < 1">
<f:then>
<f:link.action class="btn btn-danger" onclick="if (confirm('Really delete key \"{extension.extKey}\"?')) return true; else return false;" action="delete" controller="Registerkey" arguments="{extension: extension}">
<i class="fa fa-trash-o"></i>
Delete
</f:link.action>
</f:then>
<f:else>
<f:link.action class="btn btn-secondary" onclick="if (confirm('Really abandon key \"{extension.extKey}\"?')) return true; else return false;" action="transfer" controller="Registerkey" arguments="{extension: extension, newUser: 'abandoned_extensions'}">
<i class="fa fa-trash-o"></i>
Abandon
</f:link.action>
</f:else>
</f:if>
<f:link.action class="btn btn-info" action="edit" controller="Extension" arguments="{extension: extension}">
<i class="fa fa-pencil"></i>
Edit
</f:link.action>
<f:link.action class="btn btn-success" action="uploadVersion" controller="Extension" arguments="{extension: extension}" pageUid="{settings.pages.uploadVersionPID}">
<i class="fa fa-arrow-circle-o-up"></i>
Upload
</f:link.action>
</td>
</tr>
</f:for>
</tbody>
</table>
</div>
<f:if condition="{expiringExtensions -> f:count()}">
......@@ -175,75 +236,3 @@
</f:security.ifHasRole>
</div>
</f:section>
<f:section name="extensionList">
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">
<f:translate key="extensionKey" />
</th>
</tr>
</thead>
<tbody>
<f:for each="{extensions}" as="extension">
<tr>
<td>
<f:if condition="{extension.versionCount} < 1">
<f:then>
{extension.extKey}
</f:then>
<f:else>
<f:link.action pageUid="{settings.pages.extensionDetailPID}" controller="Extension" action="show" arguments="{extension : extension}">{extension.extKey}</f:link.action>
/ <span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
</f:else>
</f:if>
<br />
<small>
<f:if condition="{extension.versionCount} < 1">
<f:then>
<f:translate key="tx_terfe2_domain_model_extension.versions.no" />
</f:then>
<f:else>
<f:if condition="{extension.versionCount} > 1">
<f:then>
<f:translate key="tx_terfe2_domain_model_extension.versions.multiple" arguments="{0: extension.versionCount}" />
</f:then>
<f:else>
<f:translate key="tx_terfe2_domain_model_extension.versions.one" />
</f:else>
</f:if>
(last upload on <f:format.date format="m/d/Y h:i a (T)">{extension.lastVersion.uploadDate}</f:format.date>)
</f:else>
</f:if>
</small>
</td>
<td class="text-right">
<f:if condition="{extension.versionCount} < 1">
<f:then>
<f:link.action class="btn btn-danger" onclick="if (confirm('Really delete key \"{extension.extKey}\"?')) return true; else return false;" action="delete" controller="Registerkey" arguments="{extension: extension}">
<i class="fa fa-trash-o"></i>
Delete
</f:link.action>
</f:then>
<f:else>
<f:link.action class="btn btn-secondary" onclick="if (confirm('Really abandon key \"{extension.extKey}\"?')) return true; else return false;" action="transfer" controller="Registerkey" arguments="{extension: extension, newUser: 'abandoned_extensions'}">
<i class="fa fa-trash-o"></i>
Abandon
</f:link.action>
</f:else>
</f:if>
<f:link.action class="btn btn-info" action="edit" controller="Extension" arguments="{extension: extension}">
<i class="fa fa-pencil"></i>
Edit
</f:link.action>
<f:link.action class="btn btn-success" action="uploadVersion" controller="Extension" arguments="{extension: extension}" pageUid="{settings.pages.uploadVersionPID}">
<i class="fa fa-arrow-circle-o-up"></i>
Upload
</f:link.action>
</td>
</tr>
</f:for>
</tbody>
</table>
</f:section>
Markdown is supported
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