Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 7369) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -7462,26 +7466,27 @@ } $GLOBALS['TYPO3_DB']->sql_free_result($res); } - } - // If first run, check if the ID should be returned: - if (!$recursionLevel) { - if ($addId) { - if ($begin > 0) { - $theList.= 0; - } else { - $theList.= $addId; + + // If first run, check if the ID should be returned: + if (!$recursionLevel) { + if ($addId) { + if ($begin > 0) { + $theList.= 0; + } else { + $theList.= $addId; + } } + + $GLOBALS['TYPO3_DB']->exec_INSERTquery( + 'cache_treelist', + array( + 'md5hash' => $requestHash, + 'pid' => $id, + 'treelist' => $theList, + 'tstamp' => $GLOBALS['EXEC_TIME'], + ) + ); } - - $GLOBALS['TYPO3_DB']->exec_INSERTquery( - 'cache_treelist', - array( - 'md5hash' => $requestHash, - 'pid' => $id, - 'treelist' => $theList, - 'tstamp' => $GLOBALS['EXEC_TIME'], - ) - ); } // Return list: return $theList;