TYPO3 CMS  TYPO3_8-7
BackendWarnings.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Rsaauth;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
22 {
28  public function displayWarningMessages_postProcess(array &$warnings)
29  {
30  $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
31  if ($backend instanceof \TYPO3\CMS\Rsaauth\Backend\CommandLineBackend) {
32  // Not using the PHP extension!
33  $lang = $this->getLanguageService();
34  $warnings['rsaauth_cmdline'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_using_cmdline');
35  // Check the path
36  $extconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rsaauth'], ['allowed_classes' => false]);
37  $path = trim($extconf['temporaryDirectory']);
38  if ($path == '') {
39  // Path is empty
40  $warnings['rsaauth'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_empty_directory');
41  } elseif (!\TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath($path)) {
42  // Path is not absolute
43  $warnings['rsaauth'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_directory_not_absolute');
44  } elseif (!@is_dir($path)) {
45  // Path does not represent a directory
46  $warnings['rsaauth'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_directory_not_exist');
47  } elseif (!@is_writable($path)) {
48  // Directory is not writable
49  $warnings['rsaauth'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_directory_not_writable');
50  } elseif (substr($path, 0, strlen(PATH_site)) == PATH_site) {
51  // Directory is inside the site root
52  $warnings['rsaauth'] = $lang->sL('LLL:EXT:rsaauth/Resources/Private/Language/locallang.xlf:hook_directory_inside_siteroot');
53  }
54  }
55  }
56 
62  protected function getLanguageService()
63  {
64  return $GLOBALS['LANG'];
65  }
66 }
displayWarningMessages_postProcess(array &$warnings)
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']