From c775f5e77e59fd5cce55086bfcf083a031616d18 Mon Sep 17 00:00:00 2001 From: Dmitry Dulepov Date: Mon, 18 Aug 2008 09:54:52 +0000 Subject: [PATCH] Fixed bug #7921: recursive pidInList for select in cObj CONTENT git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3986 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 1 + typo3/sysext/cms/tslib/class.tslib_content.php | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 70db178caef1..5558a382ddae 100755 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Fixed bug #8627: Translation of the belog-module (thanks to Christopher Stelmaszyk and Christian Kuhn) * Fixed bug #8532: enhance TYPO3 manual (inline) (thanks to Steffen Kamper, Jens Hoffman and Uschi Renziehausen) + * Fixed bug #7921: recursive pidInList for select in cObj CONTENT (thanks to Georg Ringer) 2008-08-16 Stanislas Rolland diff --git a/typo3/sysext/cms/tslib/class.tslib_content.php b/typo3/sysext/cms/tslib/class.tslib_content.php index 2c71fb469631..150763920abb 100755 --- a/typo3/sysext/cms/tslib/class.tslib_content.php +++ b/typo3/sysext/cms/tslib/class.tslib_content.php @@ -6798,6 +6798,18 @@ class tslib_cObj { // Construct WHERE clause: $conf['pidInList'] = trim($this->stdWrap($conf['pidInList'],$conf['pidInList.'])); + + // Handle recursive function for the pidInList + if (isset($conf['recursive'])) { + $conf['recursive'] = intval($conf['recursive']); + if ($conf['recursive'] > 0) { + foreach (explode(',', $conf['pidInList']) as $value) { + $pidList .= $value . ',' . $this->getTreeList($value, $conf['recursive']); + } + $conf['pidInList'] = trim($pidList, ','); + } + } + if (!strcmp($conf['pidInList'],'')) { $conf['pidInList'] = 'this'; } -- 2.20.1