[BUGFIX] Recycler ignores depth setting 21/21321/2
authorStefan Galinski <stefan.galinski@gmail.com>
Mon, 10 Jun 2013 15:17:44 +0000 (17:17 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 11 Jun 2013 13:23:07 +0000 (15:23 +0200)
The recycler currently ignores the depth
setting, because of a wrong type check
since the migration to mysqli.

Fixes: #48997
Releases: 6.2, 6.1
Change-Id: Ib7a4eb1fc68468ce09944bb9342e070a6ab3860f
Reviewed-on: https://review.typo3.org/21321
Reviewed-by: Wouter Wolters
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php

index c4dde1c..77d2dcc 100644 (file)
@@ -227,7 +227,7 @@ class DeletedRecords {
                        if ($allowDepth && $depth >= 1) {
                                // check recursively for elements beneath this page
                                $resPages = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . $id, '', 'sorting');
-                               if (is_resource($resPages)) {
+                               if ($resPages) {
                                        while ($rowPages = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resPages)) {
                                                $this->setData($rowPages['uid'], $table, $depth - 1, $tcaCtrl, $filter);
                                                // some records might have been added, check if we still have the limit for further queries