[CLEANUP] EXT:recordlist 24/52624/3
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 26 Apr 2017 21:29:57 +0000 (23:29 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 2 May 2017 18:25:44 +0000 (20:25 +0200)
- Remove duplicated code
- Remove 2nd argument to call of LanguageService::sL
- Smaller nitpicks

Releases: master
Resolves: #81028
Change-Id: I3fc7ad0e1f9d687f96a780123dc82ec02397c458
Reviewed-on: https://review.typo3.org/52624
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php
typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 21dd8d9..678fb1f 100644 (file)
@@ -146,7 +146,6 @@ class FileLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
      *
      * @param Folder $folder The folder path to expand
      * @param string $extensionList List of file extensions to show
-     * @return string HTML output
      */
     public function expandFolder(Folder $folder, $extensionList = '')
     {
index 4c6358f..3bf396c 100644 (file)
@@ -221,34 +221,6 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
     }
 
     /**
-     * Sets a DB mount and stores it in the currently defined backend user in her/his uc
-     */
-    protected function setTemporaryDbMounts()
-    {
-        $backendUser = $this->getBackendUser();
-
-        // Clear temporary DB mounts
-        $tmpMount = GeneralUtility::_GET('setTempDBmount');
-        if (isset($tmpMount)) {
-            $backendUser->setAndSaveSessionData('pageTree_temporaryMountPoint', (int)$tmpMount);
-        }
-        // Set temporary DB mounts
-        $alternativeWebmountPoint = (int)$backendUser->getSessionData('pageTree_temporaryMountPoint');
-        if ($alternativeWebmountPoint) {
-            $alternativeWebmountPoint = GeneralUtility::intExplode(',', $alternativeWebmountPoint);
-            $backendUser->setWebmounts($alternativeWebmountPoint);
-        } else {
-            // Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
-            $alternativeWebmountPoints = trim($backendUser->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
-            $appendAlternativeWebmountPoints = $backendUser->getTSConfigVal('options.pageTree.altElementBrowserMountPoints.append');
-            if ($alternativeWebmountPoints) {
-                $alternativeWebmountPoints = GeneralUtility::intExplode(',', $alternativeWebmountPoints);
-                $this->getBackendUser()->setWebmounts($alternativeWebmountPoints, $appendAlternativeWebmountPoints);
-            }
-        }
-    }
-
-    /**
      * @return string[] Array of body-tag attributes
      */
     public function getBodyTagAttributes()
index 0fa92b0..ba98b47 100644 (file)
@@ -575,7 +575,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
 
         // get translated labels for search levels from pagets
         foreach ($searchLevelsFromTSconfig as $keySearchLevel => $labelConfigured) {
-            $label = $lang->sL('LLL:' . $labelConfigured, false);
+            $label = $lang->sL('LLL:' . $labelConfigured);
             if ($label === '') {
                 $label = $labelConfigured;
             }
index 4e2590b..c4a8a64 100644 (file)
@@ -646,12 +646,12 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
         }
         if ($this->firstElementNumber > 2 && $this->iLimit > 0) {
             // Get the two previous rows for sorting if displaying page > 1
-            $this->firstElementNumber = $this->firstElementNumber - 2;
-            $this->iLimit = $this->iLimit + 2;
+            $this->firstElementNumber -= 2;
+            $this->iLimit += 2;
             // (API function from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList)
             $queryBuilder = $this->getQueryBuilder($table, $id, $additionalConstraints);
-            $this->firstElementNumber = $this->firstElementNumber + 2;
-            $this->iLimit = $this->iLimit - 2;
+            $this->firstElementNumber += 2;
+            $this->iLimit -= 2;
         } else {
             // (API function from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList)
             $queryBuilder = $this->getQueryBuilder($table, $id, $additionalConstraints);