Project

General

Profile

Bug #20852 » bug_11672.diff

Administrator Admin, 2010-06-09 16:47

View differences:

typo3_src.new/typo3/sysext/version/cm1/index.php 2010-05-11 12:58:00.000000000 +0200
$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'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);
/**
* generates a preview link for each language available on the page
* [PATCH begin] Constantin Lebrecht <constantin.lebrecht@dkd.de>
*/
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_language_uid',
'pages_language_overlay',
'pid='.$this->id.' AND hidden=0 AND deleted=0');
while( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res) ) {
// add the language id as param to the generated preview link
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);
} else {
$params = 'id='.$this->id.'&L='.$row['sys_language_uid'].'&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);
}
// fetch the name of the language
$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title',
'sys_language',
'uid='.$row['sys_language_uid']);
$language = $GLOBALS['TYPO3_DB']->sql_fetch_row($res2);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl').' ('.$language[0].')', sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
}
/**
* [PATCH end]
*/
}
// Output overview content:
(3-3/3)