|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2010-2011 Stanislas Rolland <typo3@sjbr.ca> 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 * Hook into the backend module "Reports" checking whether there are extensions installed that conflicting with htmlArea RTE 00027 * 00028 * @version $Id: class.tx_rtehtmlarea_statusreport_conflictscheck.php $ 00029 */ 00030 class tx_rtehtmlarea_statusReport_conflictsCheck implements tx_reports_StatusProvider { 00031 /** 00032 * Compiles a collection of system status checks as a status report. 00033 * 00034 * @see typo3/sysext/reports/interfaces/tx_reports_StatusProvider::getStatus() 00035 */ 00036 public function getStatus() { 00037 $reports = array( 00038 'noConflictingExtensionISInstalled' => $this->checkIfNoConflictingExtensionIsInstalled() 00039 ); 00040 return $reports; 00041 } 00042 /** 00043 * Check whether any conflicting extension has been installed 00044 * 00045 * @return tx_reports_reports_status_Status 00046 */ 00047 protected function checkIfNoConflictingExtensionIsInstalled() { 00048 $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:title'); 00049 $conflictingExtensions = array(); 00050 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['conflicts'])) { 00051 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['conflicts'] as $extensionKey => $version) { 00052 if (t3lib_extMgm::isLoaded($extensionKey)) { 00053 $conflictingExtensions[] = $extensionKey; 00054 } 00055 } 00056 } 00057 if (count($conflictingExtensions)) { 00058 $value = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:keys') . ' ' . implode(', ', $conflictingExtensions); 00059 $message = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:uninstall'); 00060 $status = tx_reports_reports_status_Status::ERROR; 00061 } else { 00062 $value = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:none'); 00063 $message = ''; 00064 $status = tx_reports_reports_status_Status::OK; 00065 } 00066 return t3lib_div::makeInstance('tx_reports_reports_status_Status', 00067 $title, 00068 $value, 00069 $message, 00070 $status 00071 ); 00072 } 00073 } 00074 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/hooks/statusreport/class.tx_rtehtmlarea_statusreport_conflictscheck.php'])) { 00075 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/hooks/statusreport/class.tx_rtehtmlarea_statusreport_conflictscheck.php']); 00076 } 00077 ?>
1.8.0