/** * MAIN function for cache information * * @return string Output HTML for the module. */ public function main() { $typo3VersionArray = VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version()); $this->typo3VersionMain = $typo3VersionArray['version_main']; if ($this->typo3VersionMain > 6) { $this->iconFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconFactory'); } if ($this->pObj->id) { $result = $this->createModuleContentForPage(); } else { $result = '<p>' . $GLOBALS['LANG']->getLL('no_page_id') . '</p>'; } return $result; }
/** * Gets the TYPO3 version */ protected function getTypo3Version() { $this->systemInformation[] = ['title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:toolbarItems.sysinfo.typo3-version')), 'value' => htmlspecialchars(VersionNumberUtility::getCurrentTypo3Version()), 'icon' => $this->iconFactory->getIcon('sysinfo-typo3-version', Icon::SIZE_SMALL)->render()]; }
/** * Get current installed version number * * @return string */ public function getInstalledVersion() { return VersionNumberUtility::getCurrentTypo3Version(); }
private static function useCompatibility6() { return version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<'); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } \R3H6\Error404page\Utility\CustomPageUtility::addDoktype($_EXTKEY, \R3H6\Error404page\Configuration\ExtensionConfiguration::get('doktypeError404page'), 'Error404page'); if (TYPO3_MODE === 'BE' && \R3H6\Error404page\Configuration\ExtensionConfiguration::get('enableErrorLog')) { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:error404page/Configuration/TypoScript/setup.txt">'); if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<')) { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:error404page/Configuration/TypoScript/Compatibility6/setup.txt">'); } /** * Registers a Backend Module */ \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('R3H6.' . $_EXTKEY, 'web', 'statistic', '', array('Error' => 'dashboard, list, show, deleteAll'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.svg', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_statistic.xlf')); } if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.4.0', '>=')) { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile($_EXTKEY, 'Configuration/PageTS/Redirect403.txt', 'EXT:error404page :: Redirect 403 error to login page'); } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_error404page_domain_model_error', 'EXT:error404page/Resources/Private/Language/locallang_csh_tx_error404page_domain_model_error.xlf');
header('HTTP/1.0 403 Request not allowed'); } else { echo $token; } } else { header('HTTP/1.0 500 Invalid request'); } } else { $sessionToken = NULL; $data = NULL; $signature = NULL; if (isset($_POST['st']) && isset($_POST['d']) && isset($_POST['s'])) { $sessionToken = $_POST['st']; $data = $_POST['d']; $signature = $_POST['s']; } else { header('HTTP/1.0 500 Invalid request'); } // handle data string correctly, if typo3 added slashes to the post vars if (VersionNumberUtility::convertVersionNumberToInteger(VersionNumberUtility::getCurrentTypo3Version()) < 7005000 && !get_magic_quotes_gpc()) { $data = stripslashes($data); } $request = new tx_caretakerinstance_CommandRequest(array('session_token' => $sessionToken, 'client_info' => array('host_address' => $remoteAddress), 'data' => array(), 'raw' => $data, 'signature' => $signature)); $result = $commandService->executeCommand($request); // TODO Check for result failure and maybe throw a HTTP status code echo $commandService->wrapCommandResult($result); } } catch (Exception $exception) { echo json_encode(array('status' => tx_caretakerinstance_CommandResult::status_undefined, 'exception' => array('code' => $exception->getCode()), 'message' => $exception->getMessage())); } exit;