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

ChangeLog
typo3/mod/user/ws/index.php

index cf5d65b..73a076d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,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)
+
 2010-10-15 Steffen Kamper  <steffen@typo3.org>
 
        * Fixed bug #15928:#15543 Bugfix : PHP Warning in t3lib_spritemanager (Thanks to Sven Juergens)
index 269b00a..fba8897 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');