[BUGFIX] Add module name in shortcut name 69/41669/7
authorTomita Militaru <militarutomita@gmail.com>
Sat, 18 Jul 2015 13:30:12 +0000 (16:30 +0300)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 20 Jul 2015 10:21:52 +0000 (12:21 +0200)
When creating a shortcut to a backend module add the module name
instead of using "Shortcut" as name.

Resolves: #68298
Releases: master
Change-Id: I12d6a7af2781520ec18e4c04c2eb485adb07ce9c
Reviewed-on: http://review.typo3.org/41669
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php

index 7838036..fd6b2ff 100644 (file)
@@ -536,6 +536,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                        }
                        // adding the shortcut
                        if ($module && $url) {
+                               if ($shortcutName === 'Shortcut' && !empty($languageService->moduleLabels['labels'][$module . '_tablabel'])) {
+                                       $shortcutName = $languageService->moduleLabels['labels'][$module . '_tablabel'];
+                               }
                                $fieldValues = array(
                                        'userid' => $this->getBackendUser()->user['uid'],
                                        'module_name' => $module . '|' . $motherModule,