Bug #21112 ยป 12025.diff
typo3/sysext/reports/reports/class.tx_reports_reports_status.php (working copy) | ||
---|---|---|
* @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
|
||
... | ... | |
}
|
||
/**
|
||
* 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
|
||
... | ... | |
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 .= '<tr><th class="'. $class .'">'. $status->getTitle() .'</th><td class="'. $class .'">'. $status->getValue() .'</td></tr>';
|
||
$content .= '<tr><th class="'. $class .'">'. $status['title'] .'</th><td class="'. $class .'">'. $status['value'] .'</td></tr>';
|
||
} else {
|
||
$content .= '<tr><th class="'. $class .' merge-down">'. $status->getTitle() .'</th><td class="'. $class .' merge-down">'. $status->getValue() .'</td></tr>';
|
||
$content .= '<tr><th class="'. $class .' merge-down">'. $status['title'] .'</th><td class="'. $class .' merge-down">'. $status['value'] .'</td></tr>';
|
||
$content .= '<tr><td class="'. $class .' merge-up" colspan="2">'. $description .'</td></tr>';
|
||
}
|
||
}
|
||
return $content . '</table>';
|
||
}
|
||
/**
|
||
* 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;
|
||
}
|
||
}
|
||
typo3/sysext/reports/mod/index.php (working copy) | ||
---|---|---|
$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
|
||
... | ... | |
$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);
|
||
}
|
||