[BUGFIX] getAvailableWorkspaces called statically 62/32562/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 20 Jun 2014 18:28:14 +0000 (20:28 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 2 Sep 2014 20:45:51 +0000 (22:45 +0200)
Use same call to getAvailableWorkspaces as in
checkAccess.

Resolves: #51420
Releases: 6.3, 6.2
Change-Id: Icbea4611d7bd498e25bf658d7f3fa5a74539f479
Reviewed-on: http://review.typo3.org/32562
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php

index 577be59..5ce6feb 100644 (file)
@@ -87,7 +87,9 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar
                $this->addJavascriptToBackend();
 
                $index = 0;
-               $availableWorkspaces = \TYPO3\CMS\Workspaces\Service\WorkspaceService::getAvailableWorkspaces();
+               /** @var \TYPO3\CMS\Workspaces\Service\WorkspaceService $wsService */
+               $wsService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
+               $availableWorkspaces = $wsService->getAvailableWorkspaces();
                $activeWorkspace = (int)$GLOBALS['BE_USER']->workspace;
                $stateCheckedIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-checked');
                $stateUncheckedIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty', array(