Project

General

Profile

Feature #19832 ยป bug-10147.diff

Administrator Admin, 2011-03-17 16:25

View differences:

sysext/simulatestatic/class.tx_simulatestatic.php (working copy)
// If the special key 'sectionIndex_uid' (added 'manually' in tslib/menu.php to the page-record) is set,
// then the link jumps directly to a section on the page.
$LD['sectionIndex'] = ($page['sectionIndex_uid'] ? '#c'.$page['sectionIndex_uid'] : '');
$sectionMarkFormat = $GLOBALS['TSFE']->tmpl->setup['tt_content.']['stdWrap.']['innerWrap.']['cObject.']['default.']['10.']['value'];
// User may configure section marker through TypoScript:
// tt_content.stdWrap.innerWrap.cObject.default.10.value = <div id="section-{field:uid}">|</div>
$sectionMarkFormat = preg_replace('/.*id=[\'"]([^\'"]*)[\'"].*/', '\1', $sectionMarkFormat);
$LD['sectionIndex'] = ($page['sectionIndex_uid'] ? '#' . str_replace('{field:uid}', $page['sectionIndex_uid'], $sectionMarkFormat) : '');
// Compile the normal total url
$LD['totalURL'] = $parentObject->removeQueryString($LD['url'] . $LD['type'] . $LD['no_cache'] . $LD['linkVars'] . $GLOBALS['TSFE']->getMethodUrlIdToken) . $LD['sectionIndex'];
sysext/cms/tslib/class.tslib_content.php (working copy)
$sectionMark = isset($conf['section.'])
? trim($this->stdWrap($conf['section'], $conf['section.']))
: trim($conf['section']);
$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#c' : '#') . $sectionMark : '';
$sectionMarkFormat = $GLOBALS['TSFE']->tmpl->setup['tt_content.']['stdWrap.']['innerWrap.']['cObject.']['default.']['10.']['value'];
// User may configure section marker through TypoScript:
// tt_content.stdWrap.innerWrap.cObject.default.10.value = <div id="section-{field:uid}">|</div>
$sectionMarkFormat = preg_replace('/.*id=[\'"]([^\'"]*)[\'"].*/', '\1', $sectionMarkFormat);
$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#' . str_replace('{field:uid}', $sectionMark, $sectionMarkFormat) : '#' . $sectionMark) : '';
$initP = '?id=' . $GLOBALS['TSFE']->id . '&type=' . $GLOBALS['TSFE']->type;
$this->lastTypoLinkUrl = '';
$this->lastTypoLinkTarget = '';
......
} // If no id or alias is given
if ($link_params_parts[1] && !$sectionMark) {
$sectionMark = trim($link_params_parts[1]);
$sectionMark = (t3lib_div::testInt($sectionMark) ? '#c' : '#') . $sectionMark;
$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#' . str_replace('{field:uid}', $sectionMark, $sectionMarkFormat) : '#' . $sectionMark) : '';
}
if (count($pairParts) > 1) {
    (1-1/1)