bug-10147.diff

Administrator Admin, 2011-03-17 16:25

Download (2.9 KB)

View differences:

sysext/simulatestatic/class.tx_simulatestatic.php (working copy)
164 164

  
165 165
		// If the special key 'sectionIndex_uid' (added 'manually' in tslib/menu.php to the page-record) is set,
166 166
		// then the link jumps directly to a section on the page.
167
		$LD['sectionIndex'] = ($page['sectionIndex_uid'] ? '#c'.$page['sectionIndex_uid'] : '');
167
		$sectionMarkFormat = $GLOBALS['TSFE']->tmpl->setup['tt_content.']['stdWrap.']['innerWrap.']['cObject.']['default.']['10.']['value'];
168
			// User may configure section marker through TypoScript:
169
			// tt_content.stdWrap.innerWrap.cObject.default.10.value = <div id="section-{field:uid}">|</div>
170
		$sectionMarkFormat = preg_replace('/.*id=[\'"]([^\'"]*)[\'"].*/', '\1', $sectionMarkFormat); 
171
		$LD['sectionIndex'] = ($page['sectionIndex_uid'] ? '#' . str_replace('{field:uid}', $page['sectionIndex_uid'], $sectionMarkFormat) : '');
168 172

  
169 173
			// Compile the normal total url
170 174
		$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)
5434 5434
		$sectionMark = isset($conf['section.'])
5435 5435
			? trim($this->stdWrap($conf['section'], $conf['section.']))
5436 5436
			: trim($conf['section']);
5437
		$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#c' : '#') . $sectionMark : '';
5437
		$sectionMarkFormat = $GLOBALS['TSFE']->tmpl->setup['tt_content.']['stdWrap.']['innerWrap.']['cObject.']['default.']['10.']['value'];
5438
			// User may configure section marker through TypoScript:
5439
			// tt_content.stdWrap.innerWrap.cObject.default.10.value = <div id="section-{field:uid}">|</div>
5440
		$sectionMarkFormat = preg_replace('/.*id=[\'"]([^\'"]*)[\'"].*/', '\1', $sectionMarkFormat); 
5441
		$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#' . str_replace('{field:uid}', $sectionMark, $sectionMarkFormat) : '#' . $sectionMark) : '';
5438 5442
		$initP = '?id=' . $GLOBALS['TSFE']->id . '&type=' . $GLOBALS['TSFE']->type;
5439 5443
		$this->lastTypoLinkUrl = '';
5440 5444
		$this->lastTypoLinkTarget = '';
......
5605 5609
					} // If no id or alias is given
5606 5610
					if ($link_params_parts[1] && !$sectionMark) {
5607 5611
						$sectionMark = trim($link_params_parts[1]);
5608
						$sectionMark = (t3lib_div::testInt($sectionMark) ? '#c' : '#') . $sectionMark;
5612
						$sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark) ? '#' . str_replace('{field:uid}', $sectionMark, $sectionMarkFormat) : '#' . $sectionMark) : '';
5609 5613
					}
5610 5614

  
5611 5615
					if (count($pairParts) > 1) {