[TASK] Deprecate ExtendedFileUtility::pushErrorMessagesToFlashMessageQueue 09/45209/4
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 2 Nov 2015 21:49:17 +0000 (22:49 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 9 Jan 2016 11:17:07 +0000 (12:17 +0100)
Remove usages of ExtendedFileUtility::pushErrorMessagesToFlashMessageQueue
and deprecate the public method.

Error messages published by ExtendedFileUtility get added to the flash
message queue in a translated version so it's unnecessary to publish an
untranslated version based on the log entries as well.

Resolves: #72175
Releases: master
Change-Id: I818541916f182b63151a866590bb1541a0c02d39
Reviewed-on: https://review.typo3.org/45209
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-71255-ExtendedFileUtilitypushErrorMessagesToFlashMessageQueue.rst [new file with mode: 0644]
typo3/sysext/filelist/Classes/Controller/FileListController.php

index 4c95a4f..2ddf555 100644 (file)
@@ -163,8 +163,6 @@ class FileController
      */
     public function finish()
     {
-        // Push errors to flash message queue, if there are any
-        $this->fileProcessor->pushErrorMessagesToFlashMessageQueue();
         BackendUtility::setUpdateSignal('updateFolderTree');
         if ($this->redirect) {
             \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->redirect);
@@ -183,8 +181,6 @@ class FileController
     {
         $this->main();
 
-        // Push errors to flash message queue, if there are any
-        $this->fileProcessor->pushErrorMessagesToFlashMessageQueue();
         BackendUtility::setUpdateSignal('updateFolderTree');
 
         if ($this->redirect) {
index 46f6bd0..e8d1e95 100644 (file)
@@ -312,9 +312,11 @@ class ExtendedFileUtility extends BasicFileUtility
      * Adds all log error messages from the operations of this script instance to the FlashMessageQueue
      *
      * @return void
+     * @deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9
      */
     public function pushErrorMessagesToFlashMessageQueue()
     {
+        GeneralUtility::logDeprecatedFunction();
         foreach ($this->getErrorMessages() as $msg) {
             $flashMessage = GeneralUtility::makeInstance(
                 FlashMessage::class,
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-71255-ExtendedFileUtilitypushErrorMessagesToFlashMessageQueue.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-71255-ExtendedFileUtilitypushErrorMessagesToFlashMessageQueue.rst
new file mode 100644 (file)
index 0000000..3d075e5
--- /dev/null
@@ -0,0 +1,20 @@
+=================================================================================
+Deprecation: #71255 - ExtendedFileUtility::pushErrorMessagesToFlashMessageQueue()
+=================================================================================
+
+Description
+===========
+
+Method ``\TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::pushErrorMessagesToFlashMessageQueue()`` has been marked as deprecated.
+
+
+Affected Installations
+======================
+
+Instances with custom backend modules that use this method.
+
+
+Migration
+=========
+
+Implement the method by yourself.
index fd689aa..dad420c 100644 (file)
@@ -378,7 +378,6 @@ class FileListController extends ActionController
                     $fileProcessor->setExistingFilesConflictMode($this->overwriteExistingFiles);
                     $fileProcessor->start($FILE);
                     $fileProcessor->processData();
-                    $fileProcessor->pushErrorMessagesToFlashMessageQueue();
                 }
             }
             // Start up filelisting object, include settings.