Project

General

Profile

Bug #21053 » 0011950_v2.patch

Administrator Admin, 2010-01-19 12:30

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
}
}
// Determine URL scheme for absolute links:
$absoluteUrlScheme = (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https' : 'http');
// URL shall be absolute:
if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl']) {
// If no domain records are defined, use current domain:
if ($targetDomain === '') {
$targetDomain = $currentDomain;
}
// Override scheme:
if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) {
$absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme'];
}
}
// If target page has a different domain and the current domain's linking scheme (e.g. simulateStaticDocuments/RealURL/...) should not be used
if (strlen($targetDomain) && !$enableLinksAcrossDomains) {
if (strlen($targetDomain) && $targetDomain !== $currentDomain && !$enableLinksAcrossDomains) {
$target = isset($conf['extTarget']) ? $conf['extTarget'] : $GLOBALS['TSFE']->extTarget;
if ($conf['extTarget.']) {
$target = $this->stdWrap($target, $conf['extTarget.']);
......
$target = $forceTarget;
}
$LD['target'] = $target;
$this->lastTypoLinkUrl = $this->URLqMark('http://' . $targetDomain . '/index.php?id=' . $page['uid'], $addQueryParams) . $sectionMark;
$this->lastTypoLinkUrl = $this->URLqMark($absoluteUrlScheme . '://' . $targetDomain . '/index.php?id=' . $page['uid'], $addQueryParams) . $sectionMark;
} else { // Internal link or current domain's linking scheme should be used
if ($forceTarget) {
$target = $forceTarget;
......
}
$urlParts = parse_url($LD['totalURL']);
if ($urlParts['host'] == '') {
$LD['totalURL'] = 'http://' . $targetDomain . ($LD['totalURL']{0} == '/' ? '' : '/') . $LD['totalURL'];
$LD['totalURL'] = $absoluteUrlScheme . '://' . $targetDomain . ($LD['totalURL']{0} == '/' ? '' : '/') . $LD['totalURL'];
}
}
$this->lastTypoLinkUrl = $this->URLqMark($LD['totalURL'],'').$sectionMark;
(2-2/3)