TYPO3 CMS  TYPO3_6-2
BackendWarnings.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Rsaauth;
3 
23 
31  public function displayWarningMessages_postProcess(array &$warnings) {
32  $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
33  if ($backend instanceof \TYPO3\CMS\Rsaauth\Backend\CommandLineBackend) {
34  // Not using the PHP extension!
35  $warnings['rsaauth_cmdline'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_using_cmdline');
36  // Check the path
37  $extconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rsaauth']);
38  $path = trim($extconf['temporaryDirectory']);
39  if ($path == '') {
40  // Path is empty
41  $warnings['rsaauth'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_empty_directory');
42  } elseif (!\TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath($path)) {
43  // Path is not absolute
44  $warnings['rsaauth'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_directory_not_absolute');
45  } elseif (!@is_dir($path)) {
46  // Path does not represent a directory
47  $warnings['rsaauth'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_directory_not_exist');
48  } elseif (!@is_writable($path)) {
49  // Directory is not writable
50  $warnings['rsaauth'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_directory_not_writable');
51  } elseif (substr($path, 0, strlen(PATH_site)) == PATH_site) {
52  // Directory is inside the site root
53  $warnings['rsaauth'] = $GLOBALS['LANG']->sL('LLL:EXT:rsaauth/hooks/locallang.xlf:hook_directory_inside_siteroot');
54  }
55  }
56  }
57 
58 }
displayWarningMessages_postProcess(array &$warnings)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]