[BUGFIX] Use module state of reports module 36/58336/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 19 Sep 2018 12:42:50 +0000 (14:42 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 19 Sep 2018 13:34:17 +0000 (15:34 +0200)
The reports module stores its latest action selection in
backend user uc and should select that action on next
call again. This broke with the refactoring of #84231

Resolves: #86318
Related: #84231
Releases: master
Change-Id: If3cfe27361bcdc7b15c2f1cfaa34a8cc0c1e88c9
Reviewed-on: https://review.typo3.org/58336
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/reports/Classes/Controller/ReportController.php

index f946604..52b02b1 100644 (file)
@@ -79,7 +79,7 @@ class ReportController
      */
     public function handleRequest(ServerRequestInterface $request): ResponseInterface
     {
-        $action = $request->getQueryParams()['action'] ?? $request->getParsedBody()['action'] ?? 'index';
+        $action = $request->getQueryParams()['action'] ?? $request->getParsedBody()['action'] ?? '';
         $extension = $request->getQueryParams()['extension'] ?? $request->getParsedBody()['extension'];
         $isRedirect = $request->getQueryParams()['redirect'] ?? $request->getParsedBody()['redirect'] ?? false;
 
@@ -96,6 +96,9 @@ class ReportController
                 ]), 303);
             }
         }
+        if (empty($action)) {
+            $action = 'index';
+        }
 
         $this->initializeView($action);