Index: typo3/mod/user/ws/class.wslib_gui.php
===================================================================
--- typo3/mod/user/ws/class.wslib_gui.php (revision 2255)
+++ typo3/mod/user/ws/class.wslib_gui.php (working copy)
@@ -381,10 +381,24 @@
// Traverse the versions of the element
foreach($recs as $rec) {
- // Get the offline version record and icon:
+ // Get the offline version record:
$rec_off = t3lib_BEfunc::getRecord($table,$rec['uid']);
+
+ // Prepare swap-mode values:
+ if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
+ if ($rec_off['t3ver_swapmode']>0) {
+ $vType = 'branch'; // Do not translate!
+ } else {
+ $vType = 'page'; // Do not translate!
+ }
+ } else {
+ $vType = 'element'; // Do not translate!
+ }
+
+ // Get icon:
$icon = t3lib_iconWorks::getIconImage($table, $rec_off, $this->doc->backPath, ' align="top" title="'.t3lib_BEfunc::getRecordIconAltText($rec_off,$table).'"');
- $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $rec_off['uid'], 2, '', '+edit,view,info,delete');
+ $tempUid = ($table != 'pages' || $vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
+ $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 2, '', '+edit,view,info,delete');
// Prepare diff-code:
if ($this->diff) {
@@ -404,17 +418,6 @@
} else $diffCode = '';
- // Prepare swap-mode values:
- if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
- if ($rec_off['t3ver_swapmode']>0) {
- $vType = 'branch'; // Do not translate!
- } else {
- $vType = 'page'; // Do not translate!
- }
- } else {
- $vType = 'element'; // Do not translate!
- }
-
switch($vType) {
case 'element':
$swapLabel = ' ['.$LANG->getLL('label_element').']';
@@ -447,12 +450,12 @@
$multipleWarning = (!$mainCell && $GLOBALS['BE_USER']->workspace!==0? '
'.$this->doc->icons(3).''.$LANG->getLL('label_multipleversions').'' : '');
$verWarning = $warnAboutVersions || ($warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'])? '
'.$this->doc->icons(3).''.$LANG->getLL('label_nestedversions').'' : '';
$verElement = $icon.
- ''.
- t3lib_BEfunc::getRecordTitle($table,$rec_off,TRUE).
- ''.
- $versionsInOtherWSWarning.
- $multipleWarning.
- $verWarning;
+ ''.
+ t3lib_BEfunc::getRecordTitle($table,$rec_off,TRUE).
+ ''.
+ $versionsInOtherWSWarning.
+ $multipleWarning.
+ $verWarning;
if ($diffCode) {
$verElement = '