[BUGFIX] Upgrade Wizard must work also on records marked as deleted 37/52537/5
authorChristian Toffolo <ian@webian.it>
Fri, 21 Apr 2017 05:36:58 +0000 (07:36 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 16 Mar 2018 12:25:57 +0000 (13:25 +0100)
Deleted records can be restored using the recycler, therefore the
wizards should check deleted records as well.

Resolves: #80836
Releases: master,8.7
Change-Id: I56a27c9dab4433c47c536edaa9649c5ebc73faad
Reviewed-on: https://review.typo3.org/52537
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/install/Classes/Updates/BulletContentElementUpdate.php
typo3/sysext/install/Classes/Updates/MigrateFscStaticTemplateUpdate.php
typo3/sysext/install/Classes/Updates/SectionFrameToFrameClassUpdate.php
typo3/sysext/install/Classes/Updates/SplitMenusUpdate.php
typo3/sysext/install/Classes/Updates/UploadContentElementUpdate.php

index 8c910f5..65c1895 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Install\Updates;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -40,7 +39,7 @@ class BulletContentElementUpdate extends AbstractUpdate
             return false;
         }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $elementCount = $queryBuilder->count('uid')
             ->from('tt_content')
             ->where(
@@ -65,7 +64,7 @@ class BulletContentElementUpdate extends AbstractUpdate
     {
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
         $queryBuilder = $connection->createQueryBuilder();
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder->select('uid', 'layout')
             ->from('tt_content')
             ->where(
index f66cc5f..770d72f 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Install\Updates;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -40,7 +39,7 @@ class MigrateFscStaticTemplateUpdate extends AbstractUpdate
             return false;
         }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_template');
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $elementCount = $queryBuilder->count('uid')
             ->from('sys_template')
             ->where(
@@ -77,7 +76,7 @@ class MigrateFscStaticTemplateUpdate extends AbstractUpdate
     {
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('sys_template');
         $queryBuilder = $connection->createQueryBuilder();
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder->select('uid', 'include_static_file', 'constants', 'config')
             ->from('sys_template')
             ->where(
index 54fb322..c33ba45 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Install\Updates;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -46,7 +45,7 @@ class SectionFrameToFrameClassUpdate extends AbstractUpdate
             return false;
         }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $elementCount = $queryBuilder->count('uid')
             ->from('tt_content')
             ->where(
@@ -72,7 +71,7 @@ class SectionFrameToFrameClassUpdate extends AbstractUpdate
     {
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
         $queryBuilder = $connection->createQueryBuilder();
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder->select('uid', 'section_frame')
             ->from('tt_content')
             ->where(
index 6a11527..3ee4cbf 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Install\Updates;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -46,7 +45,7 @@ class SplitMenusUpdate extends AbstractUpdate
             return false;
         }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $elementCount = $queryBuilder->count('uid')
             ->from('tt_content')
             ->where(
@@ -72,7 +71,7 @@ class SplitMenusUpdate extends AbstractUpdate
     {
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
         $queryBuilder = $connection->createQueryBuilder();
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder->select('uid', 'header', 'menu_type')
             ->from('tt_content')
             ->where(
index 48574b8..4b47aa4 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Install\Updates;
  */
 
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -40,7 +39,7 @@ class UploadContentElementUpdate extends AbstractUpdate
             return false;
         }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $elementCount = $queryBuilder->count('uid')
             ->from('tt_content')
             ->where(
@@ -65,7 +64,7 @@ class UploadContentElementUpdate extends AbstractUpdate
     {
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
         $queryBuilder = $connection->createQueryBuilder();
-        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder->select('uid', 'layout')
             ->from('tt_content')
             ->where(