[BUGFIX] Unset stdWrap of select.pidInList
authorMarc Bastian Heinrichs <heinrichs@mbh-web.de>
Fri, 2 Dec 2011 15:23:20 +0000 (16:23 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Thu, 9 Feb 2012 22:13:11 +0000 (23:13 +0100)
Using stdWrap features on select.pidInList together with slide will
result in an endless loop because the same parentPids are
selected over and over again till the max execution time is reached.

This patch unsets the stdWrap properties after the first run.

Change-Id: I9427779c047063d47cf555e45664cb6dbb5c980a
Fixes: #28526
Releases: 4.4, 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/7033
Reviewed-by: Markus Klein
Reviewed-by: Wouter Wolters
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/cms/tslib/content/class.tslib_content_content.php

index 8345325..dcf33aa 100644 (file)
@@ -158,6 +158,9 @@ class tslib_content_Content extends tslib_content_Abstract {
                                                $slide--;
                                        }
                                        $conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);
                                                $slide--;
                                        }
                                        $conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);
+                                       if (isset($conf['select.']['pidInList.'])) {
+                                               unset($conf['select.']['pidInList.']);
+                                       }
                                        $again = strlen($conf['select.']['pidInList']) ? TRUE : FALSE;
                                }
                        } while ($again && (($slide && !strlen($tmpValue) && $slideCollectFuzzy) || ($slide && $slideCollect)));
                                        $again = strlen($conf['select.']['pidInList']) ? TRUE : FALSE;
                                }
                        } while ($again && (($slide && !strlen($tmpValue) && $slideCollectFuzzy) || ($slide && $slideCollect)));