[TASK] Remove unused code from RecordHistory 58/47758/3
authorStephan Großberndt <stephan@grossberndt.de>
Mon, 18 Apr 2016 16:26:39 +0000 (18:26 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 18 Apr 2016 17:43:42 +0000 (19:43 +0200)
Removed all occurrences of reading and passing the parameter sumUp,
since it is always set to -1, last usage of different values was in
TYPO3 3.8.

Releases: master
Resolves: #75752
Change-Id: I6545828a42af0687bbdf03b0761b152289d97c26
Reviewed-on: https://review.typo3.org/47758
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Richard Haeser <richardhaeser@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/History/RecordHistory.php

index 070d476..b6543e8 100644 (file)
@@ -1379,7 +1379,6 @@ class EditDocumentController extends AbstractModule
                                 array(
                                     'element' => $this->firstEl['table'] . ':' . $this->firstEl['uid'],
                                     'revert' => 'ALL_FIELDS',
-                                    'sumUp' => -1,
                                     'returnUrl' => $this->R_URI,
                                 )
                             )
index a611769..9b658f0 100755 (executable)
@@ -1214,7 +1214,6 @@ class PageLayoutController
                                     array(
                                         'element' => $this->eRParts[0] . ':' . $this->eRParts[1],
                                         'revert' => 'ALL_FIELDS',
-                                        'sumUp' => -1,
                                         'returnUrl' => $this->R_URI,
                                     )
                                 )
index 6357978..272185e 100644 (file)
@@ -316,7 +316,6 @@ class RteController extends AbstractWizardController
                             array(
                                 'element' => $this->P['table'] . ':' . $this->P['uid'],
                                 'revert' => 'field:' . $this->P['field'],
-                                'sumUp' => -1,
                                 'returnUrl' => $this->R_URI,
                             )
                         )
index 74285ed..acd5001 100644 (file)
@@ -132,28 +132,6 @@ class RecordHistory
      */
     public function main()
     {
-        // Single-click rollback
-        if ($this->getArgument('revert') && $this->getArgument('sumUp')) {
-            $this->rollbackFields = $this->getArgument('revert');
-            $this->showInsertDelete = 0;
-            $this->showSubElements = 0;
-            $element = explode(':', $this->element);
-            /** @var QueryBuilder $queryBuilder */
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_history');
-            $record = $queryBuilder
-                ->select('*')
-                ->from('sys_history')
-                ->where($queryBuilder->expr()->eq('tablename', $queryBuilder->createNamedParameter($element[0])))
-                ->andWhere($queryBuilder->expr()->eq('recuid', (int)$element[1]))
-                ->orderBy('uid', 'DESC')
-                ->execute()
-                ->fetch();
-            $this->lastSyslogId = $record['sys_log_uid'];
-            $this->createChangeLog();
-            $completeDiff = $this->createMultipleDiff();
-            $this->performRollback($completeDiff);
-            HttpUtility::redirect($this->returnUrl);
-        }
         // Save snapshot
         if ($this->getArgument('highlight') && !$this->getArgument('settings')) {
             $this->toggleHighlight($this->getArgument('highlight'));