Fixed bug #16786: Versioning: Generating preview link not working
authorFrancois Suter <francois.suter@typo3.org>
Tue, 21 Dec 2010 21:16:13 +0000 (21:16 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Tue, 21 Dec 2010 21:16:13 +0000 (21:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9871 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/cm1/index.php

index b67f7e9..4a74c42 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-21  Francois Suter  <francois.suter@typo3.org>
+
+       * Fixed bug #16786: Versioning: Generating preview link not working (thanks to Frederic Gaus)
+
 2010-12-21  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #16760: RTE transformation removes all span tags on save after upgrade TYPO3 4.4.5
index 1f4e904..4b0ffc3 100755 (executable)
@@ -729,10 +729,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $ttlHours = ($ttlHours ? $ttlHours : 24*2);
 
                        if (t3lib_div::_POST('_previewLink_wholeWorkspace'))    {
-                               $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);
+                               $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_BEfunc::getViewDomain($this->id) .'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);
                }