[BUGFIX] QueryGenerator getTreeList negative ids 31/32331/2
authorKlaas Johan Kooistra <k.kooistra@youwe.nl>
Thu, 31 Jul 2014 09:39:39 +0000 (11:39 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 23 Aug 2014 12:39:26 +0000 (14:39 +0200)
When persistence.recursive is configured when using a command controller no
records can be retrieved because the storagePid is negated in the
AbstractConfigurationManager, while claiming all implementations of getTreeList
support negative ids. Using abs() on the id when it is negative fixes this.
Also see the ContentObjectRenderer implementation of getTreeList

Change-Id: I7732290126a83a79204b8224d52a3cd878360e64
Resolves: #60697
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/32331
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php

index e3fdd36..f5e53e3 100644 (file)
@@ -1441,6 +1441,9 @@ class QueryGenerator {
                $depth = (int)$depth;
                $begin = (int)$begin;
                $id = (int)$id;
+               if ($id < 0) {
+                       $id = abs($id);
+               }
                if ($begin == 0) {
                        $theList = $id;
                } else {
index 0305ff8..7c8df1e 100644 (file)
@@ -711,6 +711,9 @@ class QueryView {
                $depth = (int)$depth;
                $begin = (int)$begin;
                $id = (int)$id;
+               if ($id < 0) {
+                       $id = abs($id);
+               }
                if ($begin == 0) {
                        $theList = $id;
                } else {