Bug #64654 ยป TemplateService.php.diff
phbern.ch-263-columba.phbern.ch/typo3Devupdate/typo3/sysext/core/Classes/TypoScript/TemplateService.php 2015-01-30 17:07:22.000000000 +0100 | ||
---|---|---|
} else {
|
||
// Normal Operation, which is to include the "based-on" sys_templates,
|
||
// if they are not already included, and maintaining the sorting of the templates
|
||
$basedOnIds = GeneralUtility::intExplode(',', $row['basedOn']);
|
||
$basedOnIds = GeneralUtility::intExplode(',', $row['basedOn'], true);
|
||
// skip template if it's already included
|
||
foreach ($basedOnIds as $key => $basedOnId) {
|
||
if (GeneralUtility::inList($idList, 'sys_' . $basedOnId)) {
|
||
unset($basedOnIds[$key]);
|
||
}
|
||
}
|
||
$subTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_template', 'uid IN (' . implode(',', $basedOnIds) . ') ' . $this->whereClause, '', '', '', 'uid');
|
||
// Traversing list again to ensure the sorting of the templates
|
||
foreach ($basedOnIds as $id) {
|
||
if (is_array($subTemplates[$id])) {
|
||
$this->versionOL($subTemplates[$id]);
|
||
$this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
|
||
if (count($basedOnIds) > 0) {
|
||
$subTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_template', 'uid IN (' . implode(',', $basedOnIds) . ') ' . $this->whereClause, '', '', '', 'uid');
|
||
// Traversing list again to ensure the sorting of the templates
|
||
foreach ($basedOnIds as $id) {
|
||
if (is_array($subTemplates[$id])) {
|
||
$this->versionOL($subTemplates[$id]);
|
||
$this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
|
||
}
|
||
}
|
||
}
|
||
}
|