From a5238e03a9c3fe794e4b1b684a7d029873991857 Mon Sep 17 00:00:00 2001 From: Tolleiv Nietsch Date: Wed, 6 Jul 2011 19:52:56 +0200 Subject: [PATCH] [BUGFIX] Add documentation in review controller The decisions made for the controller aren't clear from just looking at the code. The added comment and the small cleanup hopefully make it clear now. Change-Id: Ic22516bf1198d1f1c162056227a25d818aed18c2 Resolves: #26900 Releases: 4.6 --- .../workspaces/Classes/Controller/ReviewController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/workspaces/Classes/Controller/ReviewController.php b/typo3/sysext/workspaces/Classes/Controller/ReviewController.php index 380d4f7cd793..45e57683e663 100644 --- a/typo3/sysext/workspaces/Classes/Controller/ReviewController.php +++ b/typo3/sysext/workspaces/Classes/Controller/ReviewController.php @@ -44,11 +44,15 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller $activeWorkspace = $GLOBALS['BE_USER']->workspace; $performWorkspaceSwitch = FALSE; + /** + * Only admins see multiple tabs, we decided to use it this + * way for usability reasons. Regular users might be confused + * by switching workspaces with the tabs in a module. + */ if (!$GLOBALS['BE_USER']->isAdmin()) { $wsCur = array($activeWorkspace => TRUE); $wsList = array_intersect_key($wsList, $wsCur); } else { - $wsList = $wsService->getAvailableWorkspaces(); if (strlen(t3lib_div::_GP('workspace'))) { $switchWs = (int) t3lib_div::_GP('workspace'); if (in_array($switchWs, array_keys($wsList)) && $activeWorkspace != $switchWs) { -- 2.20.1