Commit d299a238 authored by Andreas Wolf's avatar Andreas Wolf

[CLEANUP] #281: Remove tx_ter_extensionqueue and its usages

parent 17f5d241
Pipeline #2810 passed with stages
in 4 minutes and 8 seconds
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionuid',
'crdate' => 'crdate',
'tstamp' => 'tstamp',
'delete' => 'deleted',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensionqueue.gif',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => 'hidden, extensionkey, extensionuid, imported_to_fe',
],
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'extensionkey' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.extensionkey',
'config' => [
'type' => 'input',
'size' => '20',
'max' => '40',
],
],
'extensionuid' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.extensionuid',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'imported_to_fe' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.imported_into_fe',
'config' => [
'type' => 'checkbox'
],
],
],
'types' => [
'1' => ['showitem' => 'extensionuid,extensionkey,imported_into_fe'],
]
];
......@@ -96,20 +96,3 @@ CREATE TABLE tx_ter_extensiondetails (
KEY extuid (extensionuid)
);
#
# Table structure for table 'tx_ter_extensionqueue'
#
CREATE TABLE tx_ter_extensionqueue (
uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
extensionkey varchar(30) DEFAULT '' NOT NULL,
extensionuid int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
imported_to_fe tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY imported (imported_to_fe)
);
......@@ -72,52 +72,6 @@ class ExtensionImportService
'Extension "%s" still exists in ter_fe2 with version %s',
$extensionData['extensionkey'], $extensionData['version']
));
$this->removeExtensionFromQueue($extensionRecord['uid']);
}
/**
* @param int $extUid
* @return void
*/
private function removeExtensionFromQueue($extUid)
{
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable('tx_ter_extensionqueue');
$queryBuilder
->update('tx_ter_extensionqueue')
->where(
$queryBuilder->expr()->eq('extensionuid', $extUid)
)
->set('tstamp', time())
->set('imported_to_fe', 1)
->execute();
}
/**
* Gets extensions from queue which
* are not imported yet in ter_fe2
*
* @return array $extensions Extensions in queue table
*/
private function getExtensionsFromQueue()
{
$tableName = 'tx_ter_extensionqueue';
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()->removeAll();
$statement = $queryBuilder
->select('extensionuid', 'crdate')
->from($tableName)
->where(
$queryBuilder->expr()->eq('deleted', 0),
$queryBuilder->expr()->eq('imported_to_fe', 0)
)
->orderBy('crdate')
->execute();
$statement->execute();
return $statement->fetchAll(\PDO::FETCH_ASSOC);
}
/**
......
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