[BUGFIX] Info link in file context menu broken
authorAndreas Wolf <andreas.wolf@typo3.org>
Thu, 4 Oct 2012 08:16:04 +0000 (10:16 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Thu, 1 Nov 2012 08:18:50 +0000 (09:18 +0100)
The link for file info in the context menu of the file list module does
not work, as it missed the special identifier '_FILE'.

Change-Id: Ie9990e3800b0d4e8b49c2594b4ad96d9ffe9839b
Resolves: #41396
Releases: 6.0
Reviewed-on: http://review.typo3.org/15295
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php

index 8bc0d3f..734da67 100644 (file)
@@ -749,7 +749,7 @@ class ClickMenu {
                        }
                        // Info
                        if (!in_array('info', $this->disabledItems)) {
-                               $menuItems['info'] = $this->DB_info($identifier, '');
+                               $menuItems['info'] = $this->fileInfo($identifier);
                        }
                        $menuItems[] = 'spacer';
                        // Copy:
@@ -901,6 +901,16 @@ class ClickMenu {
                return $this->linkItem($this->label('pasteinto'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-into')), $editOnClick . 'return false;');
        }
 
+       /**
+        * Adding ClickMenu element for file info
+        *
+        * @param string $identifier The combined identifier of the file.
+        * @return array Item array, element in $menuItems
+        */
+       protected function fileInfo($identifier) {
+               return $this->DB_info('_FILE', $identifier);
+       }
+
        /***************************************
         *
         * DRAG AND DROP