Project

General

Profile

Bug #22299 ยป 0013861.patch

Administrator Admin, 2010-03-18 17:37

View differences:

t3lib/class.t3lib_befunc.php (Arbeitskopie)
$addGetVars .= '&MP=' . $mountPointInfo['MPvar'];
}
$viewDomain = t3lib_BEfunc::getViewDomain($id, $rootLine);
$viewDomain = t3lib_BEfunc::getViewUrlPrefix($id, $rootLine);
$urlPreviewEnabled = $viewDomain . $viewScriptPreviewEnabled . $id . $addGetVars . $anchor;
$urlPreviewDisabled = $viewDomain . $viewScriptPreviewDisabled . $id . $addGetVars . $anchor;
......
}
/**
* Builds the frontend view domain for a given page ID with a given root
* line.
* Builds the frontend view URL prefix for a given page ID with a given root line.
*
* @param integer $pageId the page ID to use, must be > 0
* @param array $rootLine the root line structure to use
*
* @return string the full domain including the protocol http:// or https://, but without the trailing '/'
*
* @author Michael Klapper <michael.klapper@aoemedia.de>
*/
public static function getViewDomain($pageId, $rootLine = null) {
public static function getViewUrlPrefix($pageId, $rootLine = null) {
$domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
if (!is_array($rootLine)) {
......
// checks alternate domains
if (count($rootLine) > 0) {
$urlParts = parse_url($domain);
if (t3lib_BEfunc::getDomainStartPage($urlParts['host'], $urlParts['path'])) {
$domainName = t3lib_BEfunc::firstDomainRecord($rootLine);
if ($domainName) {
$protocol = t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://';
$domain = $protocol . t3lib_BEfunc::firstDomainRecord($rootLine);
$domain = $protocol . $domainName . $urlParts['path'];
}
}
    (1-1/1)