|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2010-2011 Ingo Renner <ingo@typo3.org> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * 00017 * This script is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * This copyright notice MUST APPEAR in all copies of the script! 00023 ***************************************************************/ 00024 00025 00026 /** 00027 * Post processes the warning messages found in about modules. 00028 * 00029 * @author Ingo Renner <ingo@typo3.org> 00030 * @package TYPO3 00031 * @subpackage reports 00032 */ 00033 class tx_reports_reports_status_WarningMessagePostProcessor { 00034 00035 /** 00036 * Tries to get the highest severity of the system's status first, if 00037 * something is found it is asumed that the status update task is set up 00038 * properly or the status report has been checked manually and we take over 00039 * control over the system warning messages. 00040 * 00041 * @param array An array of messages related to already found issues. 00042 */ 00043 public function displayWarningMessages_postProcess(array &$warningMessages) { 00044 00045 // get highest severity 00046 $registry = t3lib_div::makeInstance('t3lib_Registry'); 00047 $highestSeverity = $registry->get( 00048 'tx_reports', 00049 'status.highestSeverity', 00050 NULL 00051 ); 00052 00053 if (!is_null($highestSeverity)) { 00054 // status update has run, so taking over control over the core messages 00055 unset( 00056 $warningMessages['install_password'], 00057 $warningMessages['backend_admin'], 00058 $warningMessages['install_enabled'], 00059 $warningMessages['install_encryption'], 00060 $warningMessages['file_deny_pattern'], 00061 $warningMessages['file_deny_htaccess'], 00062 $warningMessages['install_update'], 00063 $warningMessages['backend_reference'], 00064 $warningMessages['memcached'] 00065 ); 00066 00067 if ($highestSeverity > tx_reports_reports_status_Status::OK) { 00068 // display a message that there's something wrong and that 00069 // the admin should take a look at the detailed status report 00070 $GLOBALS['LANG']->includeLLFile('EXT:reports/reports/locallang.xml'); 00071 00072 $warningMessages['tx_reports_status_notification'] = sprintf( 00073 $GLOBALS['LANG']->getLL('status_problemNotification'), 00074 '<a href="javascript:top.goToModule(\'tools_txreportsM1\', 1, \'&SET[function]=tx_reports.status\');">', 00075 '</a>' 00076 ); 00077 } 00078 } 00079 } 00080 } 00081 00082 00083 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/reports/reports/status/class.tx_reports_reports_status_warningmessagepostprocessor.php'])) { 00084 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/reports/reports/status/class.tx_reports_reports_status_warningmessagepostprocessor.php']); 00085 } 00086 00087 ?>
1.8.0