Project

General

Profile

Feature #17709 ยป 0006562.diff

Administrator Admin, 2007-10-23 10:18

View differences:

typo3/mod/user/ws/index.php (working copy)
// Preview of workspace link
if (t3lib_div::_POST('_previewLink')) {
$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*24*2,$GLOBALS['BE_USER']->workspace);
$actionLinks.= '<br/>Any user can browse the workspace frontend using this link for the next 48 hours (does not require backend login):<br/><br/><a target="_blank" href="'.htmlspecialchars($previewUrl).'">'.$previewUrl.'</a>';
$previewDuration = $GLOBALS['BE_USER']->getTSConfig('options.workspaces.previewDuration');
$previewDuration = intval($previewDuration['value']);
if ($previewDuration <= 0) {
$previewDuration = 48;
}
$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$previewDuration,$GLOBALS['BE_USER']->workspace);
$actionLinks.= '<br/>Any user can browse the workspace frontend using this link for the next '.$previewDuration.' 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" />';
}
typo3/sysext/version/cm1/index.php (working copy)
if (t3lib_div::_POST('_previewLink')) {
$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']);
$previewDuration = $GLOBALS['BE_USER']->getTSConfig('options.workspaces.previewDuration');
$previewDuration = intval($previewDuration['value']);
if ($previewDuration <= 0) {
$previewDuration = 48;
}
$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], (60*60*$previewDuration));
$this->content.= $this->doc->section('Preview Url:','You can preview this page from the workspace using this link for the next 48 hours (does not require backend login):<br/><br/><a target="_blank" href="'.htmlspecialchars($previewUrl).'">'.$previewUrl.'</a>',0,1);
$this->content.= $this->doc->section('Preview Url:','You can preview this page from the workspace using this link for the next '.$previewDuration.' hours (does not require backend login):<br/><br/><a target="_blank" href="'.htmlspecialchars($previewUrl).'">'.$previewUrl.'</a>',0,1);
}
// Output overview content:
    (1-1/1)