[BUGFIX] Remove mediace extraction update 23/57323/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Fri, 22 Jun 2018 22:27:28 +0000 (00:27 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sat, 23 Jun 2018 10:08:26 +0000 (12:08 +0200)
The mediace Extension is only available for TYPO3 7.6.

There is no point for this update in TYPO3 8.

Resolves: #83508
Releases: 8.7
Change-Id: Ib1476059534f57446799ca8ebb0c5d6deb757e58
Reviewed-on: https://review.typo3.org/57323
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/install/Classes/Updates/MediaceExtractionUpdate.php [deleted file]
typo3/sysext/install/ext_localconf.php

diff --git a/typo3/sysext/install/Classes/Updates/MediaceExtractionUpdate.php b/typo3/sysext/install/Classes/Updates/MediaceExtractionUpdate.php
deleted file mode 100644 (file)
index e86a110..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Updates;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Installs and downloads EXT:mediace if needed
- */
-class MediaceExtractionUpdate extends AbstractDownloadExtensionUpdate
-{
-    /**
-     * @var string
-     */
-    protected $title = 'Installs extension "mediace" from TER if media elements are used.';
-
-    /**
-     * @var string
-     */
-    protected $extensionKey = 'mediace';
-
-    /**
-     * @var array
-     */
-    protected $extensionDetails = [
-        'mediace' => [
-            'title' => 'Media Content Element',
-            'description' => 'The media functionality from TYPO3 6.2 and earlier can be found here.'
-                . ' This extension provides ContentObjects and Content Elements.',
-            'versionString' => '7.6.3',
-            'composerName' => 'friendsoftypo3/mediace',
-        ],
-    ];
-
-    /**
-     * Checks if an update is needed
-     *
-     * @param string &$description The description for the update
-     * @return bool Whether an update is needed (TRUE) or not (FALSE)
-     */
-    public function checkForUpdate(&$description)
-    {
-        $needsExecution = true;
-        if ($this->isWizardDone() || ExtensionManagementUtility::isLoaded('mediace')) {
-            $needsExecution = false;
-        } else {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
-            $queryBuilder->getRestrictions()->removeAll()
-                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-            $numberOfRecords = $queryBuilder->count('uid')
-                ->from('tt_content')
-                ->where($queryBuilder->expr()->in(
-                    'CType',
-                    $queryBuilder->createNamedParameter(['media', 'multimedia'], Connection::PARAM_STR_ARRAY)
-                ))
-                ->execute()
-                ->fetchColumn(0);
-            if ((int)$numberOfRecords === 0) {
-                $needsExecution = false;
-            }
-        }
-
-        if ($needsExecution) {
-            $description = 'The extension "mediace" (Media Content Element) was extracted into the'
-                . ' TYPO3 Extension Repository. This update checks if media content elements are used'
-                . ' and downloads the TYPO3 Extension from the TER.';
-        }
-
-        return $needsExecution;
-    }
-
-    /**
-     * Performs the database update if media CTypes are available.
-     *
-     * @param array &$databaseQueries Queries done in this update
-     * @param string &$customMessage Custom message
-     * @return bool
-     */
-    public function performUpdate(array &$databaseQueries, &$customMessage)
-    {
-        $updateSuccessful = $this->installExtension($this->extensionKey, $customMessage);
-        if ($updateSuccessful) {
-            $this->markWizardAsDone();
-        }
-        return $updateSuccessful;
-    }
-}
index 4dc8c98..4dafd9e 100644 (file)
@@ -14,7 +14,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\TYPO3\CMS\In
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\TYPO3\CMS\Install\Updates\WorkspacesNotificationSettingsUpdate::class] = \TYPO3\CMS\Install\Updates\WorkspacesNotificationSettingsUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['textmediaAssets'] = \TYPO3\CMS\Install\Updates\MigrateMediaToAssetsForTextMediaCe::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['compatibility6Extension'] = \TYPO3\CMS\Install\Updates\Compatibility6ExtractionUpdate::class;
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['mediaceExtension'] = \TYPO3\CMS\Install\Updates\MediaceExtractionUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['openidExtension'] = \TYPO3\CMS\Install\Updates\OpenidExtractionUpdate::class;
 
 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);