Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (Revision 7136) +++ t3lib/class.t3lib_befunc.php (Arbeitskopie) @@ -2656,7 +2656,7 @@ $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; @@ -2666,17 +2666,13 @@ } /** - * 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 */ - 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)) { @@ -2686,9 +2682,10 @@ // 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']; } }