[BUGFIX] Install tool update wizards show html tags in error message 60/28760/5
authorFrans Saris <franssaris@gmail.com>
Tue, 25 Mar 2014 12:53:34 +0000 (13:53 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Wed, 26 Mar 2014 20:52:57 +0000 (21:52 +0100)
The RteFileLinksUpdateWizard, RteMagicImagesUpdateWizard
and TceformsUpdateWizard convert there error messages to
FlashMessages. But as the messages are now always wrapped in a
flashmessage tag in the template this isn't needed anymore.

Resolves: #57285
Releases: 6.2
Change-Id: Iada05effdc523d24726ec54c2ad017175be4451f
Reviewed-on: https://review.typo3.org/28760
Reviewed-by: Philipp Gampe
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/install/Classes/Updates/RteFileLinksUpdateWizard.php
typo3/sysext/install/Classes/Updates/RteMagicImagesUpdateWizard.php
typo3/sysext/install/Classes/Updates/TceformsUpdateWizard.php

index f543c85..c8adfc4 100644 (file)
@@ -149,24 +149,15 @@ class RteFileLinksUpdateWizard extends AbstractUpdate {
                $dbQueries = $this->queries;
 
                if (count($this->errors) > 0) {
-                       foreach ($this->errors as $errorMessage) {
-                               $message = GeneralUtility::makeInstance(
-                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
-                                       $errorMessage,
-                                       '',
-                                       \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
-                               );
-                               /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
-                               $customMessages .= '<br />' . $message->render();
-                       }
+                       $customMessages .= implode(PHP_EOL, $this->errors);
                        if ($this->convertedLinkCounter == 0) {
-                                       // no links converted only missing files: UPDATE was not successful
+                               // no links converted only missing files: UPDATE was not successful
                                return FALSE;
                        }
                }
 
                if ($this->convertedLinkCounter > 0) {
-                       $customMessages = $this->convertedLinkCounter . ' links converted.<br />' . $customMessages;
+                       $customMessages = $this->convertedLinkCounter . ' links converted.' . PHP_EOL . $customMessages;
                } else {
                        $customMessages .= 'No file links found';
                }
index 7281652..1fd46b5 100644 (file)
@@ -158,12 +158,8 @@ class RteMagicImagesUpdateWizard extends AbstractUpdate {
                                        $this->logger->notice('File ' . $sourceFileName . ' does not exist. Reference was not migrated.', array());
 
                                        $format = 'File \'%s\' does not exist. Referencing field: %s.%d.%s. The reference was not migrated.';
-                                       $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('\TYPO3\CMS\Core\Messaging\FlashMessage',
-                                               sprintf($format, $sourceFileName, $refRecord['tablename'], $refRecord['recuid'], $refRecord['field']),
-                                               '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
-                                       );
-                                       /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
-                                       $customMessages .= '<br />' . $message->render();
+                                       $message = sprintf($format, $sourceFileName, $refRecord['tablename'], $refRecord['recuid'], $refRecord['field']);
+                                       $customMessages .= PHP_EOL . $message;
 
                                        continue;
                                }
index e9551e6..9550310 100644 (file)
@@ -332,12 +332,8 @@ class TceformsUpdateWizard extends AbstractUpdate {
                                        );
 
                                        $format = 'File \'%s\' does not exist. Referencing field: %s.%d.%s. The reference was not migrated.';
-                                       $message = GeneralUtility::makeInstance('\TYPO3\CMS\Core\Messaging\FlashMessage',
-                                               sprintf($format, $fieldConfiguration['sourcePath'] . $item, $table, $row['uid'], $fieldname),
-                                               '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
-                                       );
-                                       /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
-                                       $customMessages .= '<br />' . $message->render();
+                                       $message = sprintf($format, $fieldConfiguration['sourcePath'] . $item, $table, $row['uid'], $fieldname);
+                                       $customMessages .= PHP_EOL . $message;
 
                                        continue;
                                }