2 /***************************************************************
5 * (c) 2010 Ingo Renner <ingo@typo3.org>
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
27 * Post processes the warning messages found in about modules.
29 * @author Ingo Renner <ingo@typo3.org>
33 class tx_reports_reports_status_WarningMessagePostProcessor
{
36 * Tries to get the highest severity of the system's status first, if
37 * something is found it is asumed that the status update task is set up
38 * properly or the status report has been checked manually and we take over
39 * control over the system warning messages.
41 * @param array An array of messages related to already found issues.
44 public function displayWarningMessages_postProcess(array &$warningMessages) {
46 // get highest severity
47 $registry = t3lib_div
::makeInstance('t3lib_Registry');
48 $highestSeverity = $registry->get(
50 'status.highestSeverity',
54 if (!is_null($highestSeverity)) {
55 // status update has run, so taking over control over the core messages
57 $warningMessages['install_password'],
58 $warningMessages['backend_admin'],
59 $warningMessages['install_enabled'],
60 $warningMessages['install_encryption'],
61 $warningMessages['file_deny_pattern'],
62 $warningMessages['file_deny_htaccess'],
63 $warningMessages['install_update'],
64 $warningMessages['backend_reference'],
65 $warningMessages['memcached']
68 if ($highestSeverity > tx_reports_reports_status_Status
::OK
) {
69 // display a message that there's something wrong and that
70 // the admin should take a look at the detailed status report
71 $GLOBALS['LANG']->includeLLFile('EXT:reports/reports/locallang.xml');
73 $warningMessages['tx_reports_status_notification'] = sprintf(
74 $GLOBALS['LANG']->getLL('status_problemNotification'),
75 '<a href="mod.php?M=tools_txreportsM1&SET[function]=tx_reports.status">',
84 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['ext/reports/reports/status/class.tx_reports_reports_status_warningmessagepostprocessor.php']) {
85 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['ext/reports/reports/status/class.tx_reports_reports_status_warningmessagepostprocessor.php']);