Fixed bug #7921: recursive pidInList for select in cObj CONTENT
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 18 Aug 2008 09:54:52 +0000 (09:54 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 18 Aug 2008 09:54:52 +0000 (09:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3986 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 70db178..5558a38 100755 (executable)
--- 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  <typo3@sjbr.ca>
 
index 2c71fb4..1507639 100755 (executable)
@@ -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';
                }