Index: typo3/sysext/version/cm1/index.php =================================================================== --- typo3/sysext/version/cm1/index.php Tue Oct 07 17:17:47 2008 +++ typo3/sysext/version/cm1/index.php Tue Oct 07 17:18:34 2008 @@ -717,8 +717,18 @@ $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours')); $ttlHours = ($ttlHours ? $ttlHours : 24*2); - $params = 'id='.$this->id.'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace; - $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours); + $params = 'id='.$this->id.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace; + $viewScript = '/index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid']); + $rootLine = t3lib_BEfunc::BEgetRootLine($this->id); + // check alternate Domains + if ($rootLine) { + $parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL')); + if (t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path'])) { + $preUrl_temp = t3lib_BEfunc::firstDomainRecord($rootLine); + } + } + $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'../../../..'; + $previewUrl = $preUrl.$viewScript.$id.$addGetVars.$anchor; $this->content.= $this->doc->section('Preview Url:','You can preview this page from the workspace using this link for the next '.$ttlHours.' hours (does not require backend login):

'.$previewUrl.'',0,1); }