[BUGFIX] Show title in button popup with correct encoding 64/44964/4
authorMichael Oehlhof <typo3@oehlhof.de>
Thu, 26 Nov 2015 20:02:22 +0000 (21:02 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 27 Nov 2015 18:23:44 +0000 (19:23 +0100)
Resolves: #71872
Releases: master
Change-Id: I4e0b4e5479dbd9e8200e85fc0eb6097b566a66f3
Reviewed-on: https://review.typo3.org/44964
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Frank N├Ągler <frank.naegler@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php
typo3/sysext/filelist/Classes/Controller/FileListController.php

index 51d4a4f..6f5f80a 100644 (file)
@@ -252,7 +252,7 @@ class EditFileController extends AbstractModule
             ->setName('_save')
             ->setValue('1')
             ->setOnClick('document.editform.submit();')
-            ->setTitle($lang->makeEntities($lang->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.submit', true)))
+            ->setTitle(htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.submit')))
             ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL));
 
         // Save and Close button
index 140ac40..d817b95 100644 (file)
@@ -240,9 +240,8 @@ class FileSystemNavigationFrameController
         // Refresh
         $refreshButton = $buttonBar->makeLinkButton()
             ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI'))
-            ->setTitle($this->getLanguageService()->makeEntities(
-                $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.reload', true)
-            ))->setIcon($iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
+            ->setTitle(htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.reload')))
+            ->setIcon($iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
         $buttonBar->addButton($refreshButton, ButtonBar::BUTTON_POSITION_RIGHT);
 
         // CSH
index d9464ea..b5f0bd5 100644 (file)
@@ -560,14 +560,18 @@ class FileListController extends ActionController
         /** @var $resourceFactory ResourceFactory */
         $resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
 
+        $lang = $this->getLanguageService();
+
         // Refresh page
-        $refreshButton = $buttonBar->makeLinkButton()
-            ->setHref(GeneralUtility::linkThisScript(array(
+        $refreshLink = GeneralUtility::linkThisScript(
+            array(
                 'target' => rawurlencode($this->folderObject->getCombinedIdentifier()),
                 'imagemode' => $this->filelist->thumbs
-            )))
-            ->setTitle($this->getLanguageService()->makeEntities($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.reload',
-                true)))
+            )
+        );
+        $refreshButton = $buttonBar->makeLinkButton()
+            ->setHref($refreshLink)
+            ->setTitle(htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.reload')))
             ->setIcon($iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
         $buttonBar->addButton($refreshButton, ButtonBar::BUTTON_POSITION_RIGHT);
 
@@ -575,13 +579,15 @@ class FileListController extends ActionController
         try {
             $currentStorage = $this->folderObject->getStorage();
             $parentFolder = $this->folderObject->getParentFolder();
-            if ($parentFolder->getIdentifier() !== $this->folderObject->getIdentifier() && $currentStorage->isWithinFileMountBoundaries($parentFolder)) {
+            if ($parentFolder->getIdentifier() !== $this->folderObject->getIdentifier()
+                && $currentStorage->isWithinFileMountBoundaries($parentFolder)
+            ) {
+                $levelUpClick = 'top.document.getElementsByName("navigation")[0].contentWindow.Tree.highlightActiveItem("file","folder'
+                    . GeneralUtility::md5int($parentFolder->getCombinedIdentifier()) . '_"+top.fsMod.currentBank)';
                 $levelUpButton = $buttonBar->makeLinkButton()
-                    ->setHref(BackendUtility::getModuleUrl('file_FilelistList',
-                        ['id' => $parentFolder->getCombinedIdentifier()]))
-                    ->setOnClick('top.document.getElementsByName("navigation")[0].contentWindow.Tree.highlightActiveItem("file","folder' . GeneralUtility::md5int($parentFolder->getCombinedIdentifier()) . '_"+top.fsMod.currentBank)')
-                    ->setTitle($this->getLanguageService()->makeEntities($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.upOneLevel',
-                        true)))
+                    ->setHref(BackendUtility::getModuleUrl('file_FilelistList', ['id' => $parentFolder->getCombinedIdentifier()]))
+                    ->setOnClick($levelUpClick)
+                    ->setTitle(htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.upOneLevel')))
                     ->setIcon($iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL));
                 $buttonBar->addButton($levelUpButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
             }
@@ -607,8 +613,7 @@ class FileListController extends ActionController
                     )
                 ))
                 ->setClasses('t3js-drag-uploader-trigger')
-                ->setTitle($this->getLanguageService()->makeEntities($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.upload',
-                    true)))
+                ->setTitle(htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:cm.upload')))
                 ->setIcon($iconFactory->getIcon('actions-edit-upload', Icon::SIZE_SMALL));
             $buttonBar->addButton($uploadButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
         }
@@ -626,8 +631,7 @@ class FileListController extends ActionController
                         'returnUrl' => $this->filelist->listURL(),
                     )
                 ))
-                ->setTitle($this->getLanguageService()->makeEntities($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.new',
-                    true)))
+                ->setTitle(htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:cm.new')))
                 ->setIcon($iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL));
             $buttonBar->addButton($newButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
         }
@@ -653,7 +657,7 @@ class FileListController extends ActionController
                             $this->folderObject->getCombinedIdentifier()))
                         ->setOnClick('return ' . htmlspecialchars($this->filelist->clipObj->confirmMsg('_FILE',
                                 $this->folderObject->getReadablePath(), 'into', $elToConfirm)))
-                        ->setTitle($this->getLanguageService()->getLL('clip_paste', true))
+                        ->setTitle($lang->getLL('clip_paste', true))
                         ->setIcon($iconFactory->getIcon('actions-document-paste-after', Icon::SIZE_SMALL));
                     $buttonBar->addButton($pasteButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
                 }