[BUGFIX] Re-enable environment status report in Backend 25/50825/3
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Fri, 2 Dec 2016 14:32:10 +0000 (15:32 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 3 Dec 2016 12:28:46 +0000 (13:28 +0100)
The condition that checks for CLI mode in the ext_tables.php of
the install tool is fixed.

The EnvironmentStatusReport is now active in the Backend and
not on CLI.

The additional checks added in #78786 are not required any more
and are reverted.

Change-Id: I4d364fc08c68c7c25d9210c08b813247bee7d47f
Resolves: #78854
Relates: #78786
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/50825
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/install/Classes/SystemEnvironment/SetupCheck.php
typo3/sysext/install/ext_tables.php

index 68fcf16..087d7c6 100644 (file)
@@ -311,11 +311,8 @@ class Check
     {
         $minimumMaximumExecutionTime = 30;
         $recommendedMaximumExecutionTime = 240;
-        $currentMaximumExecutionTime = (int)ini_get('max_execution_time');
-        if (PHP_SAPI === 'cli' && $currentMaximumExecutionTime === 0) {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('Infinite PHP script execution time detected, which is admissible on the CLI');
-        } elseif ($currentMaximumExecutionTime === 0) {
+        $currentMaximumExecutionTime = ini_get('max_execution_time');
+        if ($currentMaximumExecutionTime == 0) {
             $status = new Status\WarningStatus();
             $status->setTitle('Infinite PHP script execution time');
             $status->setMessage(
@@ -351,7 +348,6 @@ class Check
             $status->setTitle('Maximum PHP script execution time is equal to or more than '
                 . $recommendedMaximumExecutionTime);
         }
-
         return $status;
     }
 
index 2479fd1..14c19c1 100644 (file)
@@ -60,9 +60,6 @@ class SetupCheck
             $status = new Status\WarningStatus();
             $status->setTitle('Trusted hosts pattern is insecure');
             $status->setMessage('Trusted hosts pattern is configured to allow all header values. Check the pattern defined in Install Tool -> All configuration -> System -> trustedHostsPattern and adapt it to expected host value(s).');
-        } elseif (PHP_SAPI === 'cli') {
-            $status = new Status\NoticeStatus();
-            $status->setTitle('Trusted hosts pattern cannot be checked on the CLI');
         } else {
             if (GeneralUtility::hostHeaderValueMatchesTrustedHostsPattern($_SERVER['HTTP_HOST'])) {
                 $status = new Status\OkStatus();
index 1b3e4bf..5fef669 100644 (file)
@@ -7,7 +7,7 @@ if (TYPO3_MODE === 'BE') {
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Install\Report\SecurityStatusReport::class;
 
     // Only add the environment status report if not in CLI mode
-    if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) {
+    if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class;
     }