Project

General

Profile

Bug #21053 » 0011950_v3.patch

Administrator Admin, 2010-02-22 11:34

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
}
}
$absoluteUrlScheme = '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;
(3-3/3)