Project

General

Profile

Bug #17959 ยป class.t3lib_tcemain.php.diff

Administrator Admin, 2007-12-31 06:09

View differences:

t3lib/class.t3lib_tcemain.php (working copy)
$callBackFunc,
$structurePath.$key.'/el/'.$ik.'/'.$theKey.'/el/'
);
// If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
// The fact that the order changes is not important since order is controlled by a separately submitted index.
if (substr($ik,0,3)=="ID-") {
$newIndexCounter++;
$this->newIndexMap[$ik] = (is_array($dataValues_current[$key]['el'])&&count($dataValues_current[$key]['el'])?max(array_keys($dataValues_current[$key]['el'])):0)+$newIndexCounter; // Set mapping index
$dataValues[$key]['el'][$this->newIndexMap[$ik]] = $dataValues[$key]['el'][$ik]; // Transfer values
unset($dataValues[$key]['el'][$ik]); // Unset original
}
}
// If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
// The fact that the order changes is not important since order is controlled by a separately submitted index.
if (substr($ik,0,3)=="ID-") {
$newIndexCounter++;
$this->newIndexMap[$ik] = (is_array($dataValues_current[$key]['el'])&&count($dataValues_current[$key]['el'])?max(array_keys($dataValues_current[$key]['el'])):0)+$newIndexCounter; // Set mapping index
$dataValues[$key]['el'][$this->newIndexMap[$ik]] = $dataValues[$key]['el'][$ik]; // Transfer values
unset($dataValues[$key]['el'][$ik]); // Unset original
}
}
} else {
if (!isset($dataValues[$key]['el'])) $dataValues[$key]['el']=array();
    (1-1/1)