36 if (
$GLOBALS[
'BE_USER']->workspace == 0) {
38 $curPage = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord(
'pages', $id);
40 $onlineId = $curPage[
'pid'] == -1 ? $curPage[
't3ver_oid'] : $id;
44 if (count($versions) > 1) {
45 $selectorLabel =
'<strong>' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/locallang.xlf:versionSelect.label', TRUE) .
'</strong>';
48 foreach ($versions as $vRow) {
49 if ($vRow[
'uid'] == $onlineId) {
51 $label =
'[' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/locallang.xlf:versionSelect.live', TRUE) .
']';
53 $label = $vRow[
't3ver_label'] .
' (' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/locallang.xlf:versionId', TRUE) .
' ' . $vRow[
't3ver_id'] . ($vRow[
't3ver_wsid'] != 0 ?
' ' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/locallang.xlf:workspaceId', TRUE) .
' ' . $vRow[
't3ver_wsid'] :
'') .
')';
55 $opt[] =
'<option value="' . htmlspecialchars(\
TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
'id' => $vRow[
'uid']))) .
'"' . ($id == $vRow[
'uid'] ?
' selected="selected"' :
'') .
'>' . htmlspecialchars($label) .
'</option>';
58 $management =
'<input type="button" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:ver.mgm', TRUE) .
'" onclick="window.location.href=\'' . htmlspecialchars(
$GLOBALS[
'BACK_PATH'] . \
TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl(
'web_txversionM1', array(
'table' =>
'pages',
'uid' => $onlineId))) .
'\';
" />'; 59 // Create onchange handler: 60 $onChange = 'window.location.href=this.options[this.selectedIndex].value;'; 62 if ($id == $onlineId) { 63 $controls .= '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5
" height="9
"') . ' class="absmiddle
" alt="" /> <strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.online', TRUE) . '</strong>'; 64 } elseif (!$noAction) { 65 $controls .= '<a href="' . $GLOBALS['TBE_TEMPLATE
']->issueCommand(('&cmd[pages][
' . $onlineId . '][version][swapWith]=
' . $id . '&cmd[pages][
' . $onlineId . '][version][action]=swap
'), \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $onlineId))) . '" class="nobr
">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-version', array( 66 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.swapPage', TRUE), 67 'style' => 'margin-left:5px;vertical-align:bottom;' 68 )) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.swap', TRUE) . '</strong></a>'; 70 // Write out HTML code: 75 <table border="0
" cellpadding="0
" cellspacing="0
" id="typo3-versionSelector
"> 77 <td>' . $selectorLabel . '</td> 79 <select onchange="' . htmlspecialchars($onChange) . '"> 80 ' . implode('', $opt) . ' 82 <td>' . $controls . '</td> 83 <td>' . $management . '</td>
getVersionSelector($id, $noAction=FALSE)
static selectVersionsOfRecord($table, $uid, $fields=' *', $workspace=0, $includeDeletedRecords=FALSE, $row=NULL)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]