Project

General

Profile

Bug #22193 » sys_templates.diff

Administrator Admin, 2010-02-25 21:59

View differences:

typo3_src-4.3.2.patched/t3lib/class.t3lib_tstemplate.php 2010-02-25 21:44:41.000000000 +0100
$GLOBALS['TYPO3_DB']->sql_free_result($res);
}
} else { // NORMAL OPERATION:
$basedOnArr = t3lib_div::intExplode(',', $row['basedOn']);
foreach ($basedOnArr as $id) { // traversing list
if (!t3lib_div::inList($idList,'sys_'.$id)) { // if $id is not allready included ...
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'uid='.intval($id).' '.$this->whereClause);
if ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // there was a template, then we fetch that
$this->versionOL($subrow);
if (is_array($subrow)) {
$this->processTemplate($subrow,$idList.',sys_'.$id,$pid, 'sys_'.$id,$templateID);
}
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'uid in ('.$row['basedOn'].') '.$this->whereClause);
while ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
if (t3lib_div::inList($idList,'sys_'.$subrow[$uid])) continue; //skip template if already included
$this->versionOL($subrow);
if (is_array($subrow)) {
$this->processTemplate($subrow,$idList.',sys_'.$subrow[$uid],$pid, 'sys_'.$subrow[$uid],$templateID);
}
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
}
}
(1-1/5)