[TASK] Show correct module action names for reports in bookmark list 67/44267/2
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 25 Oct 2015 17:49:30 +0000 (18:49 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 25 Oct 2015 22:06:51 +0000 (23:06 +0100)
Resolves: #71006
Releases: master
Change-Id: I699a8475df058175059710181073e40be3494372
Reviewed-on: https://review.typo3.org/44267
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/reports/Classes/Controller/ReportController.php

index f22cd79..4f48b8f 100644 (file)
@@ -41,6 +41,13 @@ class ReportController extends ActionController
     protected $defaultViewObjectName = BackendTemplateView::class;
 
     /**
+     * Module name for the shortcut
+     *
+     * @var string
+     */
+    protected $shortcutName;
+
+    /**
      * Redirect to the saved report
      *
      * @return void
@@ -148,6 +155,7 @@ class ReportController extends ActionController
             )
             ->setTitle($lang->getLL('reports_overview'));
         $menu->addMenuItem($menuItem);
+        $this->shortcutName = $lang->getLL('reports_overview');
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports'] as $extKey => $reports) {
             foreach ($reports as $reportName => $report) {
                 $menuItem = $menu
@@ -158,6 +166,7 @@ class ReportController extends ActionController
                 if ($this->arguments->hasArgument('extension') && $this->arguments->hasArgument('report')) {
                     if ($this->arguments->getArgument('extension')->getValue() === $extKey && $this->arguments->getArgument('report')->getValue() === $reportName) {
                         $menuItem->setActive(true);
+                        $this->shortcutName = $menuItem->getTitle();
                     }
                 }
                 $menu->addMenuItem($menuItem);
@@ -182,6 +191,7 @@ class ReportController extends ActionController
         $shortcutButton = $buttonBar->makeShortcutButton()
             ->setModuleName($moduleName)
             ->setGetVariables($getVars)
+            ->setDisplayName($this->shortcutName)
             ->setSetVariables($setVars);
         $buttonBar->addButton($shortcutButton);
     }