[!!!][TASK] Remove deprecated parameters in RecyclerUtility 42/52642/3
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 27 Apr 2017 15:48:19 +0000 (17:48 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 17 May 2017 06:31:33 +0000 (08:31 +0200)
EXT:recycler has some deprecated code that is now removed.

Releases: master
Resolves: #81237
Change-Id: I6db8ac155f2fe06a07528fbe17855c036f593e96
Reviewed-on: https://review.typo3.org/52642
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst
typo3/sysext/recycler/Classes/Utility/RecyclerUtility.php

index 629e44a..b56d62f 100644 (file)
@@ -250,6 +250,7 @@ The following methods changed signature according to previous deprecations in v8
 * TYPO3\CMS\Lang\LanguageService->getLL() - Second argument dropped
 * TYPO3\CMS\Lang\LanguageService->getLLL() - Third argument dropped
 * TYPO3\CMS\Lang\LanguageService->getsL() - Second argument dropped
+* TYPO3\CMS\Recycler\Utility\RecyclerUtility->getRecordPath() - Second, third and fourth argument dropped
 
 The following public class properties have been dropped:
 * TYPO3\CMS\Backend\Controller\EditDocumentController->localizationMode
index a1e8984..eba315d 100644 (file)
@@ -72,17 +72,10 @@ class RecyclerUtility
      * Deleted pages are filtered out.
      *
      * @param int $uid Page uid for which to create record path
-     * @param string $clause is additional where clauses, eg.
-     * @param int $titleLimit Title limit
-     * @param int $fullTitleLimit Title limit of Full title (typ. set to 1000 or so)
-     * @return mixed Path of record (string) OR array with short/long title if $fullTitleLimit is set.
+     * @return string Path of record (string) OR array with short/long title if $fullTitleLimit is set.
      */
-    public static function getRecordPath($uid, $clause = '', $titleLimit = 1000, $fullTitleLimit = 0)
+    public static function getRecordPath($uid)
     {
-        if ($clause !== '' || (int)$titleLimit !== 1000 || (int)$fullTitleLimit !== 0) {
-            GeneralUtility::deprecationLog('The arguments "clause", "tileLimit" and "fullTitleLimit" ' .
-                'have been deprecated since TYPO3 CMS 8 and will be removed in TYPO3 CMS 9');
-        }
         $uid = (int)$uid;
         $output = ($fullOutput = '/');
         if ($uid === 0) {
@@ -91,7 +84,6 @@ class RecyclerUtility
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
         $queryBuilder->getRestrictions()->removeAll();
 
-        $clause = trim($clause);
         $loopCheck = 100;
         while ($loopCheck > 0) {
             $loopCheck--;
@@ -100,22 +92,16 @@ class RecyclerUtility
                 ->select('uid', 'pid', 'title', 'deleted', 't3ver_oid', 't3ver_wsid')
                 ->from('pages')
                 ->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)));
-            if (!empty($clause)) {
-                $queryBuilder->andWhere($clause);
-            }
             $row = $queryBuilder->execute()->fetch();
             if ($row !== false) {
                 BackendUtility::workspaceOL('pages', $row);
                 if (is_array($row)) {
                     BackendUtility::fixVersioningPid('pages', $row);
                     $uid = (int)$row['pid'];
-                    $output = '/' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $titleLimit)) . $output;
+                    $output = '/' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], 1000)) . $output;
                     if ($row['deleted']) {
                         $output = '<span class="text-danger">' . $output . '</span>';
                     }
-                    if ($fullTitleLimit) {
-                        $fullOutput = '/' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $fullTitleLimit)) . $fullOutput;
-                    }
                 } else {
                     break;
                 }
@@ -123,11 +109,7 @@ class RecyclerUtility
                 break;
             }
         }
-        if ($fullTitleLimit) {
-            return [$output, $fullOutput];
-        } else {
-            return $output;
-        }
+        return $output;
     }
 
     /**