Bug #64654 ยป TemplateService.php.diff

Nils Blattner, 2015-01-30 17:16

View differences:

phbern.ch-263-columba.phbern.ch/typo3Devupdate/typo3/sysext/core/Classes/TypoScript/TemplateService.php 2015-01-30 17:07:22.000000000 +0100
665 665
			} else {
666 666
				// Normal Operation, which is to include the "based-on" sys_templates,
667 667
				// if they are not already included, and maintaining the sorting of the templates
668
				$basedOnIds = GeneralUtility::intExplode(',', $row['basedOn']);
668
				$basedOnIds = GeneralUtility::intExplode(',', $row['basedOn'], true);
669 669
				// skip template if it's already included
670 670
				foreach ($basedOnIds as $key => $basedOnId) {
671 671
					if (GeneralUtility::inList($idList, 'sys_' . $basedOnId)) {
672 672
						unset($basedOnIds[$key]);
673 673
					}
674 674
				}
675
				$subTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_template', 'uid IN (' . implode(',', $basedOnIds) . ') ' . $this->whereClause, '', '', '', 'uid');
676
				// Traversing list again to ensure the sorting of the templates
677
				foreach ($basedOnIds as $id) {
678
					if (is_array($subTemplates[$id])) {
679
						$this->versionOL($subTemplates[$id]);
680
						$this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
675
				if (count($basedOnIds) > 0) {
676
					$subTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_template', 'uid IN (' . implode(',', $basedOnIds) . ') ' . $this->whereClause, '', '', '', 'uid');
677
					// Traversing list again to ensure the sorting of the templates
678
					foreach ($basedOnIds as $id) {
679
						if (is_array($subTemplates[$id])) {
680
							$this->versionOL($subTemplates[$id]);
681
							$this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
682
						}
681 683
					}
682 684
				}
683 685
			}
    (1-1/1)