[BUGFIX] Fix interaction with versions on "All workspaces" tab 05/51005/3
authorOliver Hader <oliver@typo3.org>
Tue, 20 Dec 2016 12:08:57 +0000 (13:08 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 31 Dec 2016 14:14:56 +0000 (15:14 +0100)
Interacting with workspace versions using the "All workspaces"
tab in the workspace module was not possible. The process tried
to use the current workspace, which in this case was the virtual
workspace with ID -98 - which of course did not exist.

Change-Id: If512ef8ccc838348230531450e82b25a00f27908
Resolves: #79048
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/51005
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index 8484849..688befb 100644 (file)
@@ -665,7 +665,7 @@ class ActionHandler extends AbstractHandler
 
         $result = [];
         if ($nextStage->isDialogEnabled()) {
-            $result['sendMailTo'] = $this->getRecipientsOfStage($nextStage->getUid());
+            $result['sendMailTo'] = $this->getRecipientsOfStage($nextStage);
             $result['additional'] = [
                 'type' => 'textarea',
                 'value' => ''
index 941c8f0..4da6714 100644 (file)
@@ -93,15 +93,11 @@ class WorkspaceService implements SingletonInterface
         // Avoid invalid workspace settings
         if ($activeId !== null && $activeId !== self::SELECT_ALL_WORKSPACES) {
             $availableWorkspaces = $this->getAvailableWorkspaces();
-            if (!isset($availableWorkspaces[$activeId])) {
-                $activeId = null;
+            if (isset($availableWorkspaces[$activeId])) {
+                $workspaceId = $activeId;
             }
         }
 
-        if ($activeId !== null) {
-            $workspaceId = $activeId;
-        }
-
         return $workspaceId;
     }