Fixed bug #9508: Workspace preview link should work in multidomain-environments ...
authorBenni Mack <benni.mack@typo3.org>
Sat, 13 Nov 2010 16:59:31 +0000 (16:59 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sat, 13 Nov 2010 16:59:31 +0000 (16:59 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@9368 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/mod/user/ws/index.php
typo3/sysext/version/cm1/index.php

index eadc657..89db520 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-13  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #9508: Workspace preview link should work in multidomain-environments (Thanks to Michael Klapper)
+
 2010-11-12  Ernesto Baschny  <ernst@cron-it.de>
 
        * Fixed bug #15456: Changes made by ColorPicker Wizard are not saved (Thanks to Tobias Hoevelborn)
index fba8897..32a7ea2 100755 (executable)
@@ -468,7 +468,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        if (t3lib_div::_POST('_previewLink'))   {
                                $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                                $ttlHours = ($ttlHours ? $ttlHours : 24*2);
-                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
+                               $previewUrl = t3lib_BEfunc::getViewDomain($this->id) . 'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
                                $actionLinks.= '<br />Any user can browse the workspace frontend using this link for the next ' . $ttlHours . ' hours (does not require backend login):<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>';
                        } else {
                                $actionLinks.= '<input type="submit" name="_previewLink" value="Generate Workspace Preview Link" />';
index 5dcc1db..bab9ba5 100755 (executable)
@@ -727,10 +727,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $ttlHours = ($ttlHours ? $ttlHours : 24*2);
 
                        if (t3lib_div::_POST('_previewLink_wholeWorkspace'))    {
-                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($this->id);
+                               $previewUrl = t3lib_BEfunc::getViewDomain($this->id) . 'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($this->id);
                        } else {
                                $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);
+                               $previewUrl = t3lib_BEfunc::getViewDomain($this->id) .'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
                        }
                        $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
                }