Index: typo3/sysext/reports/reports/class.tx_reports_reports_status.php =================================================================== --- typo3/sysext/reports/reports/class.tx_reports_reports_status.php (revision 6024) +++ typo3/sysext/reports/reports/class.tx_reports_reports_status.php (working copy) @@ -69,8 +69,6 @@ * @return void */ protected function getStatusProviders() { - ksort($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']); - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'] as $key => $statusProvider) { if (t3lib_div::inList('title,description,report', $key)) { continue; // skip (for this report) unneccessary data @@ -84,7 +82,7 @@ } /** - * Renders a the system's status + * Renders the system's status * * @param array An array of statuses as returned by the available status providers * @return string The system status as an HTML table @@ -99,20 +97,59 @@ tx_reports_reports_status_Status::ERROR => 'error', ); - foreach ($statusCollection as $status) { - $class = 'typo3-message message-' . $classes[$status->getSeverity()]; - $description = $status->getMessage(); + $statuses = $this->sortStatuses($statusCollection); + + foreach ($statuses as $status) { + $class = 'typo3-message message-' . $classes[$status['severity']]; + $description = $status['message']; if (empty($description)) { - $content .= ''. $status->getTitle() .''. $status->getValue() .''; + $content .= ''. $status['title'] .''. $status['value'] .''; } else { - $content .= ''. $status->getTitle() .''. $status->getValue() .''; + $content .= ''. $status['title'] .''. $status['value'] .''; $content .= ''. $description .''; } } return $content . ''; } + + /** + * Sorts the statuses by title + * + * @param array A collection of statuses + * @return array The collection of statuses sorted by title + */ + protected function sortStatuses(array $statusCollection) { + $statuses = array(); + $sortTitle = array(); + + foreach ($statusCollection as $status) { + if ($status->getTitle() === 'TYPO3') { + $header = $status; + continue; + } + + $statuses[] = array( + 'title' => $status->getTitle(), + 'value' => $status->getValue(), + 'message' => $status->getMessage(), + 'severity' => $status->getSeverity() + ); + $sortTitle[] = $status->getTitle(); + } + array_multisort($sortTitle, SORT_ASC, $statuses); + + // making sure that the core version information is always on the top + array_unshift($statuses, array( + 'title' => $header->getTitle(), + 'value' => $header->getValue(), + 'message' => $header->getMessage(), + 'severity' => $header->getSeverity() + )); + + return $statuses; + } } Index: typo3/sysext/reports/mod/index.php =================================================================== --- typo3/sysext/reports/mod/index.php (revision 6024) +++ typo3/sysext/reports/mod/index.php (working copy) @@ -129,8 +129,7 @@ $this->renderModuleContent(); } else { // If no access or if ID == 0 - $docHeaderButtons['save'] = ''; - $this->content.=$this->doc->spacer(10); + $this->content .= $this->doc->spacer(10); } // compile document @@ -147,6 +146,7 @@ $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title')); $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); }