Fixed bug #14716: Version module don't display Title
[Packages/TYPO3.CMS.git] / typo3 / sysext / version / cm1 / index.php
index 329f701..b3fefaf 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2004-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 2004-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -82,14 +82,9 @@ require ('conf.php');
 require ($BACK_PATH.'init.php');
 require ($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:version/locallang.xml');
-require_once (PATH_t3lib.'class.t3lib_scbase.php');
-require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
        // DEFAULT initialization of a module [END]
 
-require_once(PATH_t3lib.'class.t3lib_diff.php');
 require_once(PATH_typo3.'mod/user/ws/class.wslib.php');
-require_once(PATH_t3lib.'class.t3lib_pagetree.php');
-require_once(PATH_t3lib.'class.t3lib_tcemain.php');
 
 
 
@@ -126,6 +121,7 @@ class tx_version_cm1 extends t3lib_SCbase {
        var $be_user_Array = array();
        var $stageIndex = array();
        var $recIndex = array();
+       protected $showDraftWorkspace = FALSE; // Determines whether to show the dummy draft workspace
 
 
 
@@ -145,6 +141,13 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function menuConfig()   {
 
+                       // fetches the configuration of the version extension
+               $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']);
+                       // show draft workspace only if enabled in the version extensions config
+               if($versionExtconf['showDraftWorkspace']) {
+                       $this->showDraftWorkspace = TRUE;
+               }
+
                        // Menu items:
                $this->MOD_MENU = array(
                        'filter' => array(
@@ -156,10 +159,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                                0 => $GLOBALS['LANG']->getLL('liveWorkspace'),
                                -98 => $GLOBALS['LANG']->getLL('draftWorkspaces'),
                                -99 => $GLOBALS['LANG']->getLL('filter_all'),
-                               -1 => $GLOBALS['LANG']->getLL('defaultDraft')
                        ),
                        'diff' => ''
                );
+               
+               if($this->showDraftWorkspace === TRUE) {
+                       $this->MOD_MENU['display'][-1] = $GLOBALS['LANG']->getLL('defaultDraft');
+               }
 
                        // Add workspaces:
                if ($GLOBALS['BE_USER']->workspace===0) {       // Spend time on this only in online workspace because it might take time:
@@ -182,7 +188,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function main() {
                global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
-
+               
                        // Template markers
                $markers = array(
                        'CSH' => '',
@@ -340,8 +346,8 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                if ($this->recordFound && $TCA[$this->table]['ctrl']['versioningWS']) {
                                // View page
-                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
-                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE) . '">' .
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                        '</a>';
 
                                // Shortcut
@@ -352,8 +358,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                // If access to Web>List for user, then link to that module.
                        if ($BE_USER->check('modules','web_list'))      {
                                $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
-                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
                                                '</a>';
                        }
                }
@@ -422,7 +428,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        }
 
                                        if (count($tRows)>1)    {
-                                               $content.='<table border="0" cellpadding="1" cellspacing="1" width="100%">'.implode('',$tRows).'</table><br/><br/>';
+                                               $content .= '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows) . '</table><br /><br />';
                                        } else {
                                                $content .= $GLOBALS['LANG']->getLL('recordsMatchesCompletely');
                                        }
@@ -464,9 +470,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $adminLinks = $this->adminLinks($this->table,$row);
 
                        $content.='
-                               <tr class="'.($row['uid']!=$this->uid ? 'bgColor4' : 'bgColor2 tableheader').'">
-                                       <td>'.($row['uid']!=$this->uid ? '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][action]=swap').'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert1.gif','width="14" height="14"').' alt="" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent') . '" />'.
+                               <tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader') . '">
+                                       <td>'.($row['uid']!=$this->uid ? '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][action]=swap').'" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-swap-version') .
                                                '</a>' /* (
                                                        $this->table == 'pages' ?
                                                        '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][action]=swap&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][swapContent]=1').'">'.
@@ -474,7 +480,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                '</a>'.
                                                        '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][action]=swap&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][swapContent]=ALL').'">'.
                                                '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert4.gif','width="14" height="14"').' alt="" title="Publish page AND content! - AND ALL SUBPAGES!" />'.
-                                               '</a>' : '') */ : '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/blinkarrow_left.gif','width="5" height="9"').' alt="" title="' . $GLOBALS['LANG']->getLL('currentOnlineVersion') . '"/>').'</td>
+                                               '</a>' : '') */ : t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' =>  $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE)))) . '</td>
                                        <td nowrap="nowrap">'.$adminLinks.'</td>
                                        <td nowrap="nowrap">'.t3lib_BEfunc::getRecordTitle($this->table,$row,TRUE).'</td>
                                        <td>'.$row['uid'].'</td>
@@ -485,7 +491,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        <td>'.$row['t3ver_stage'].'</td>
                                        <td>'.$row['t3ver_count'].'</td>
                                        <td>'.$row['pid'].'</td>
-                                       <td nowrap="nowrap"><a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$this->table.']['.$row['uid'].']=edit&columnsOnly=t3ver_label',$this->doc->backPath)).'"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit'). '"/></a>' . htmlspecialchars($row['t3ver_label']).'</td>
+                                       <td nowrap="nowrap"><a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$this->table.']['.$row['uid'].']=edit&columnsOnly=t3ver_label',$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
+                                               '</a>' . htmlspecialchars($row['t3ver_label']) . '</td>
                                        <td class="version-diff-1"><input type="radio" name="diff_1" value="'.$row['uid'].'"'.($diff_1==$row['uid'] ? ' checked="checked"':'').'/></td>
                                        <td class="version-diff-2"><input type="radio" name="diff_2" value="'.$row['uid'].'"'.($diff_2==$row['uid'] ? ' checked="checked"':'').'/></td>
                                </tr>';
@@ -507,20 +515,20 @@ class tx_version_cm1 extends t3lib_SCbase {
                }
                $content.='</table></form>';
 
-               $this->content.=$this->doc->section('',$content,0,1);
+               $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('title'), $content, 0, 1);
 
 
                        // Create new:
                $content='
 
                        <form action="'.$this->doc->backPath.'tce_db.php" method="post">
-                       ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd['.$this->table.']['.$this->uid.'][version][label]" /><br/>
-                       '.($this->table == 'pages' ? '<select name="cmd['.$this->table.']['.$this->uid.'][version][treeLevels]">
+                       ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br />
+                       '.(($this->table == 'pages' && $GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE)? '<select name="cmd['.$this->table.']['.$this->uid.'][version][treeLevels]">
                                '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0) ? '<option value="0">' . $GLOBALS['LANG']->getLL('cmdPid0') . '</option>' : '').'
                                '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(1) ? '<option value="100">' . $GLOBALS['LANG']->getLL('cmdPid100') . '</option>' : '').'
                                '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(-1) ? '<option value="-1">' . $GLOBALS['LANG']->getLL('cmdPid1') . '</option>' : '').'
                        </select>' : '').'
-                       <br/><input type="hidden" name="cmd['.$this->table.']['.$this->uid.'][version][action]" value="new" />
+                       <br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
                        <input type="hidden" name="prErr" value="1" />
                        <input type="hidden" name="redirect" value="'.htmlspecialchars($this->REQUEST_URI).'" />
                        <input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('createNewVersion') . '" />
@@ -616,13 +624,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                global $BE_USER;
 
                        // Edit link:
-               $adminLink = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$table.']['.$row['uid'].']=edit',$this->doc->backPath)).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit'). '"/>'.
+               $adminLink = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$table.']['.$row['uid'].']=edit',$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                '</a>';
 
                        // Delete link:
-               $adminLink.= '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$row['uid'].'][delete]=1')).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete'). '"/>'.
+               $adminLink.= '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$row['uid'].'][delete]=1')).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                                                '</a>';
 
 
@@ -638,15 +646,15 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules',$pageModule);
 
                        $adminLink.='<a href="#" onclick="top.loadEditId('.$row['uid'].');top.goToModule(\''.$pageModule.'\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="" alt="" />'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-page-open') .
                                                '</a>';
                        $adminLink.='<a href="#" onclick="top.loadEditId('.$row['uid'].');top.goToModule(\'web_list\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'mod/web/list/list.gif','width="14" height="12"').' title="" alt="" />'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
                                                '</a>';
 
                                // "View page" icon is added:
                        $adminLink.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($row['uid'],$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($row['uid']))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                } else {
                        if ($row['pid']==-1)    {
@@ -654,7 +662,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                                        // "View page" icon is added:
                                $adminLink.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($row['_REAL_PID'],$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']),'','',$getVars)).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                        '</a>';
                        }
                }
@@ -693,7 +701,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                $WSoverview = $this->displayWorkspaceOverview();
 
                        // Buttons for publish / swap:
-               $actionLinks = '<br/>';
+               $actionLinks = '<br />';
                if ($GLOBALS['BE_USER']->workspace!==0) {
                        if ($this->publishAccess)       {
                                $actionLinks.= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');"/>';
@@ -707,10 +715,11 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                $actionLinks.= '<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('refresh') . '" />';
                $actionLinks.= '<input type="submit" name="_previewLink" value="' . $GLOBALS['LANG']->getLL('previewLink') . '" />';
-               $actionLinks.= $this->displayWorkspaceOverview_allStageCmd();
+               $actionLinks.= '<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace') . '</label>';
+               $actionLinks.= $this->displayWorkspaceOverview_allStageCmd();
 
                if ($actionLinks || count($errors))     {
-                       $this->content.= $this->doc->section('',$actionLinks.(count($errors) ? '<h3>' . $GLOABLS['LANG']->getLL('errors') . '</h3><br/>'.implode('<br/>',$errors).'<hr/>' : ''),0,1);
+                       $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? '<h3>' . $GLOABLS['LANG']->getLL('errors') . '</h3><br />' . implode('<br />', $errors) . '<hr />' : ''), 0, 1);
                }
 
                if (t3lib_div::_POST('_previewLink'))   {
@@ -723,7 +732,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $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'],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);
+                       $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);
                }
 
                        // Output overview content:
@@ -810,8 +819,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $table = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding workspace-overview">'.implode('',$tableRows).'</table>';
                } else $table = '';
 
-               $linkBack = t3lib_div::_GP('returnUrl') ? '<a href="'.htmlspecialchars(t3lib_div::_GP('returnUrl')).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width="14" height="14"').' alt="" />' . $GLOBALS['LANG']->getLL('goBack') . '</a><br/><br/>' : '';
-               $resetDiffOnly = $this->diffOnly ? '<a href="index.php?id='.intval($this->id).'" class="typo3-goBack">' . $GLOBALS['LANG']->getLL('showAllInformation') . '</a><br/><br/>' : '';
+               $linkBack = t3lib_div::_GP('returnUrl') ? '<a href="' . htmlspecialchars(t3lib_div::_GP('returnUrl')) . '" class="typo3-goBack">' .
+                               t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . $GLOBALS['LANG']->getLL('goBack', TRUE) .
+                       '</a><br /><br />' : '';
+               $resetDiffOnly = $this->diffOnly ? '<a href="index.php?id=' . intval($this->id) . '" class="typo3-goBack">' . $GLOBALS['LANG']->getLL('showAllInformation') . '</a><br /><br />' : '';
 
                $versionSelector = $GLOBALS['BE_USER']->workspace ? $this->doc->getVersionSelector($this->id) : '';
 
@@ -885,14 +896,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        $diffCode = '';
                                                        list($diffHTML,$diffPct) = $this->createDiffView($table, $rec_off, $rec_on);
                                                        if ($rec_on['t3ver_state']==1)  {       // New record:
-                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement') . '<br/>';
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement') . '<br />';
                                                                $diffCode.= $diffHTML;
                                                        } elseif ($rec_off['t3ver_state']==2)   {
-                                                               $diffCode.= $this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement') . '<br/>';
+                                                               $diffCode.= $this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement') . '<br />';
                                                        } elseif ($rec_on['t3ver_state']==3)    {
-                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder') . '<br/>';
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder') . '<br />';
                                                        } elseif ($rec_off['t3ver_state']==4)   {
-                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer') . '<br/>';
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer') . '<br />';
                                                        } else {
                                                                $diffCode.= ($diffPct<0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : ''));
                                                                $diffCode.= $diffHTML;
@@ -926,9 +937,9 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                                                        // Create version element:
                                                $versionsInOtherWS = $this->versionsInOtherWS($table, $rec_on['uid']);
-                                               $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace!==0 ? '<br/>'.$this->doc->icons(2) . $GLOBALS['LANG']->getLL('otherVersions') . $versionsInOtherWS : '';
-                                               $multipleWarning = (!$mainCell && $GLOBALS['BE_USER']->workspace!==0? '<br/>'.$this->doc->icons(3).'<b>' . $GLOBALS['LANG']->getLL('multipleVersions')  . '</b>' : '');
-                                               $verWarning = $warnAboutVersions || ($warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'])? '<br/>'.$this->doc->icons(3).'<b>' . $GLOBALS['LANG']->getLL('versionInVersion')  . '</b>' : '';
+                                               $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(2) . $GLOBALS['LANG']->getLL('otherVersions') . $versionsInOtherWS : '';
+                                               $multipleWarning = (!$mainCell && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('multipleVersions') . '</strong>' : '');
+                                               $verWarning = $warnAboutVersions || ($warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages']) ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('versionInVersion') . '</strong>' : '';
                                                $verElement = $icon.
                                                        (!$this->details ? '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table==='pages'?$rec_on['uid']:$rec_on['pid']).'&details='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">' : '').
                                                        t3lib_BEfunc::getRecordTitle($table,$rec_off,TRUE).
@@ -943,13 +954,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                        $this->displayWorkspaceOverview_commandLinks($table,$rec_on,$rec_off,$vType).
                                                                        htmlspecialchars($swapLabel).
                                                                        '&nbsp;&nbsp;</td>
-                                                               '.(!$this->diffOnly?'<td nowrap="nowrap"><b>' . $GLOBALS['LANG']->getLL('lifecycle')  . ':</b> '.htmlspecialchars($this->formatCount($rec_off['t3ver_count'])).'</td>'.         // Lifecycle
+                                                               '.(!$this->diffOnly?'<td nowrap="nowrap"><strong>' . $GLOBALS['LANG']->getLL('lifecycle')  . ':</strong> '.htmlspecialchars($this->formatCount($rec_off['t3ver_count'])).'</td>'.               // Lifecycle
                                                                        ($this->showWorkspaceCol ? '
-                                                               <td nowrap="nowrap">&nbsp;&nbsp;<b>' . $GLOBALS['LANG']->getLL('workspace')  . ':</b> '.htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])).'</td>' : ''):'');
+                                                               <td nowrap="nowrap">&nbsp;&nbsp;<strong>' . $GLOBALS['LANG']->getLL('workspace')  . ':</strong> '.htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])).'</td>' : ''):'');
 
                                                if ($diffCode)  {
                                                        $verElement = $verElement.'
-                                                       <br/><b>' . $GLOBALS['LANG']->getLL('diffToLiveElement')  . '</b>
+                                                       <br /><strong>' . $GLOBALS['LANG']->getLL('diffToLiveElement') . '</strong>
                                                        <table border="0" cellpadding="0" cellspacing="0" class="ver-verElement">
                                                                <tr>
                                                                        <td class="c-diffCell">'.$diffCode.'</td>
@@ -1227,7 +1238,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                break;
                        }
                        $text = t3lib_BEfunc::dateTime($dat['tstamp']).': "'.$username.'" '.$text;
-                       $text.= ($data['comment']?'<br/>' . $GLOBALS['LANG']->getLL('userComment') . ': <em>'.htmlspecialchars($data['comment']).'</em>':'');
+                       $text.= ($data['comment'] ? '<br />' . $GLOBALS['LANG']->getLL('userComment') . ': <em>' . htmlspecialchars($data['comment']) . '</em>' : '');
 
                        $entry[] = $text;
                }
@@ -1248,7 +1259,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                global $TCA;
 
                if (!$this->details && ($GLOBALS['BE_USER']->workspace===0 || !$this->MOD_SETTINGS['expandSubElements']))       {       // In online workspace we have a reduced view because otherwise it will bloat the listing:
-                       return '<br/>
+                       return '<br />
                                        <img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/joinbottom.gif','width="18" height="16"').' align="top" alt="" title="" />'.
                                        ($origId ?
                                                '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.$uid.'&details='.rawurlencode('pages:'.$uid).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">'.
@@ -1632,8 +1643,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        ' return false;';
                                // Reject:
                        $actionLinks.=
-                               '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/down.gif','width="14" height="14"').' alt="" align="top" title="' . $GLOBALS['LANG']->getLL('reject') . '" />'.
+                               '<a href="#" onclick="'.htmlspecialchars($onClick).'" title="' . $GLOBALS['LANG']->getLL('reject', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-move-down') .
                                '</a>';
                } else {
                                // Reject:
@@ -1653,8 +1664,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        ' return false;';
                        if ($rec_off['t3ver_stage']!=10)        {
                                $actionLinks.=
-                                       '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/up.gif','width="14" height="14"').' alt="" align="top" title="'.htmlspecialchars($titleAttrib).'" />'.
+                                       '<a href="#" onclick="'.htmlspecialchars($onClick).'" title="' . htmlspecialchars($titleAttrib) . '">' .
+                                               t3lib_iconWorks::getSpriteIcon('actions-move-up') .
                                        '</a>';
 
                                $this->stageIndex[$sId][$table][] = $rec_off['uid'];
@@ -1679,8 +1690,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                '<a href="'.htmlspecialchars($this->doc->issueCommand(
                                                '&cmd['.$table.']['.$rec_on['uid'].'][version][action]=swap'.
                                                '&cmd['.$table.']['.$rec_on['uid'].'][version][swapWith]='.$rec_off['uid']
-                                               )).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert1.gif','width="14" height="14"').' alt="" align="top" title="' . $GLOBALS['LANG']->getLL('publish') . '" />'.
+                                               )).'" title="' . $GLOBALS['LANG']->getLL('publish', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-version-swap-versions') .
                                '</a>';
                        if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                                $actionLinks.=
@@ -1688,8 +1699,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][action]=swap'.
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][swapWith]='.$rec_off['uid'].
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][swapIntoWS]=1'
-                                                       )).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/swap.png','width="14" height="14"').' alt="" align="top" title="' . $GLOBALS['LANG']->getLL('swap') . '" />'.
+                                                       )).'" title="' . $GLOBALS['LANG']->getLL('swap', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace') .
                                        '</a>';
                        }
                }
@@ -1697,30 +1708,30 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (!$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table,$rec_off))   {
                                // Release
                        $actionLinks.=
-                               '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$rec_off['uid'].'][version][action]=clearWSID')).'" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('removeFromWorkspace') . '?\');">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/group_clear.gif','width="14" height="14"').' alt="" align="top" title="' . $GLOBALS['LANG']->getLL('removeFromWorkspace') . '" />'.
+                               '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$rec_off['uid'].'][version][action]=clearWSID')).'" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '?\');" title="' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-version-document-remove') .
                                '</a>';
 
                                // Edit
                        if ($table==='pages' && $vType!=='element')     {
                                $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                                $actionLinks.=
-                                       '<a href="#" onclick="top.loadEditId('.$tempUid.');top.goToModule(\''.$this->pageModule.'\'); return false;">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page'). '" alt="" />'.
+                                       '<a href="#" onclick="top.loadEditId('.$tempUid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-page-open') .
                                        '</a>';
                        } else {
                                $params = '&edit['.$table.']['.$rec_off['uid'].']=edit';
                                $actionLinks.=
-                                       '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="12" height="12"').' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element'). '" alt="" />'.
+                                       '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE). '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                        '</a>';
                        }
                }
 
                        // History/Log
                $actionLinks.=
-                       '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">'.
-                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/history2.gif','width="13" height="12"').' title="' . $GLOBALS['LANG']->getLL('showLog') . '" alt="" />'.
+                       '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">'.
+                               t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
                        '</a>';
 
                        // View
@@ -1728,7 +1739,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                        $actionLinks.=
                                '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($tempUid,$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($tempUid))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                }
 
@@ -1750,22 +1761,22 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Edit
                                if ($table==='pages')   {
                                        $actionLinks.=
-                                               '<a href="#" onclick="top.loadEditId('.$uid.');top.goToModule(\''.$this->pageModule.'\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page'). '" alt="" />'.
+                                               '<a href="#" onclick="top.loadEditId('.$uid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('apps-version-page-open') .
                                                '</a>';
                                } else {
                                        $params = '&edit['.$table.']['.$uid.']=edit';
                                        $actionLinks.=
-                                               '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="12" height="12"').' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element'). '" alt="" />'.
+                                               '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                '</a>';
                                }
                        }
 
                                // History/Log
                        $actionLinks.=
-                               '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$uid).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/history2.gif','width="13" height="12"').' title="' . $GLOBALS['LANG']->getLL('showLog') . '" alt="" />'.
+                               '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$uid).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
                                '</a>';
                }
 
@@ -1773,7 +1784,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                if ($table==='pages')   {
                        $actionLinks.=
                                '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($uid,$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($uid))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                }
 
@@ -1815,7 +1826,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $tce->start(array(), $cmd);
                                $tce->process_cmdmap();
 
-                               t3lib_BEfunc::getSetUpdateSignal('updatePageTree');
+                               t3lib_BEfunc::setUpdateSignal('updatePageTree');
 
                                return $tce->errorLog;
                        }