[BUGFIX] Prevent empty newline below scheduler-task-name 19/24619/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 12 Oct 2013 01:20:07 +0000 (03:20 +0200)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Sat, 12 Oct 2013 10:58:34 +0000 (12:58 +0200)
The newline below a scheduler-task-name is only needed
if a progress-bar and/or additional-information follow.

Change-Id: I8d92fc0d3b8d88fdbdfdc79d8ee501b74d821bcc
Resolves: #52715
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24619
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 1baf949..aaa7c51 100644 (file)
@@ -961,14 +961,13 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                if ($this->scheduler->isValidTaskObject($task)) {
                                        // The task object is valid
                                        $name = htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')');
-                                       $name .= '<br /> ';
                                        $additionalInformation = $task->getAdditionalInformation();
                                        if ($task instanceof \TYPO3\CMS\Scheduler\ProgressProviderInterface) {
                                                $progress = round(floatval($task->getProgress()), 2);
-                                               $name .= $this->renderTaskProgressBar($progress);
+                                               $name .= '<br />' . $this->renderTaskProgressBar($progress);
                                        }
                                        if (!empty($additionalInformation)) {
-                                               $name .= '[' . htmlspecialchars($additionalInformation) . ']';
+                                               $name .= '<br />[' . htmlspecialchars($additionalInformation) . ']';
                                        }
                                        // Check if task currently has a running execution
                                        if (!empty($schedulerRecord['serialized_executions'])) {