[BUGFIX] Page tree filter couldn't filter for id or title anymore 17/27317/3
authorErnesto Baschny <ernst@cron-it.de>
Tue, 4 Feb 2014 08:43:14 +0000 (09:43 +0100)
committerErnesto Baschny <ernst@cron-it.de>
Tue, 4 Feb 2014 09:06:51 +0000 (10:06 +0100)
Bug was introduced by #54265, one "(int)" was forgotten.

Releases: 6.2
Resolves: #55642
Change-Id: Ie56b36be9d2f11b46687c2966d84e49f301ffede
Reviewed-on: https://review.typo3.org/27317
Reviewed-by: Daniel Siepmann
Tested-by: Daniel Siepmann
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php

index fe81e3b..104123f 100644 (file)
@@ -270,7 +270,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                                ) {
                                        continue;
                                }
-                               if ($rootlineElement['pid'] === $nodeId
+                               if ((int)$rootlineElement['pid'] === $nodeId
                                        || $rootlineElement['uid'] === $nodeId
                                        || ($rootlineElement['uid'] === $isInWebMount
                                                && in_array($rootlineElement['uid'], $mountPoints, TRUE))
@@ -281,7 +281,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                                        continue;
                                }
                                $rootlineElement = Commands::getNodeRecord($rootlineElement['uid'], FALSE);
-                               $ident = (int)$rootlineElement['sorting'] . $rootlineElement['uid'];
+                               $ident = (int)$rootlineElement['sorting'] . (int)$rootlineElement['uid'];
                                if ($reference && $reference->offsetExists($ident)) {
                                        /** @var $refNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
                                        $refNode = $reference->offsetGet($ident);
@@ -295,7 +295,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                                } else {
                                        $refNode = Commands::getNewNode($rootlineElement, $mountPoint);
                                        $replacement = '<span class="typo3-pagetree-filteringTree-highlight">$1</span>';
-                                       if ($isNumericSearchFilter && $rootlineElement['uid'] === (int)$searchFilter) {
+                                       if ($isNumericSearchFilter && (int)$rootlineElement['uid'] === (int)$searchFilter) {
                                                $text = str_replace('$1', $refNode->getText(), $replacement);
                                        } else {
                                                $text = preg_replace('/(' . $searchFilterQuoted . ')/i', $replacement, $refNode->getText());