Fixed bug #11444: Workspace Dropdown in "Workspace" -> "Review and Publish" [LIVE...
authorBenni Mack <benni.mack@typo3.org>
Fri, 15 Oct 2010 21:28:30 +0000 (21:28 +0000)
committerBenni Mack <benni.mack@typo3.org>
Fri, 15 Oct 2010 21:28:30 +0000 (21:28 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9082 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/ws/index.php

index 23ec43c..78ec7b9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 
 2010-10-15  Benjamin Mack  <benni@typo3.org>
 
+       * Fixed bug #11444: Workspace Dropdown in "Workspace" -> "Review and Publish" [LIVE workspace] always shows "[Draft Workspace]" (Thanks to Robert Heel)
        * Added feature #15990: Introduce a new CSH API function and make use of it in TCEforms
        * Added feature #15989: Create a new abstract class t3lib_message_abstractmessage
 
index 7c73264..bbc0197 100755 (executable)
@@ -161,9 +161,11 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        'expandSubElements' => '',
                );
 
-               if($this->showDraftWorkspace === TRUE) {
+                       // check if draft workspace was enabled, and if the user has access to it
+               if ($this->showDraftWorkspace === TRUE && $GLOBALS['BE_USER']->checkWorkspace(array('uid' => -1))) {
                        $this->MOD_MENU['display'][-1] = '[' . $LANG->getLL('shortcut_offlineWS') . ']';
                }
+
                        // Add workspaces:
                if ($GLOBALS['BE_USER']->workspace===0) {       // Spend time on this only in online workspace because it might take time:
                        $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');