Fixed bug #13630: Status Report reports "Install Tool: disabled" when it is not....
authorSusanne Moog <typo3@susannemoog.de>
Fri, 16 Apr 2010 15:59:48 +0000 (15:59 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 16 Apr 2010 15:59:48 +0000 (15:59 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7376 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/reports/reports/locallang.xml
typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php

index 2dda5a8..3799e1a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-13  Susanne Moog <typo3@susanne-moog.de>
+
+       * Fixed bug #13630: Status Report reports "Install Tool: disabled" when it is not. (thanks to Gregor Hermens)
+
 2010-04-16  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #14090: In Extension Manager importExtInfo() does not sort versions correctly (thanks to Daniel Minder and Steffen Gebert)
@@ -21,7 +25,7 @@
 
 2010-04-13  Susanne Moog <typo3@susanne-moog.de>
 
-       * Fixed bug #5699: Sitemap Content Element does not     honorate Workspaces
+       * Fixed bug #5699: Sitemap Content Element does not honorate Workspaces
 
 2010-04-14  Stanislas Rolland  <typo3@sjbr.ca>
 
index 6d659de..e47f971 100644 (file)
@@ -13,6 +13,8 @@
                        <label index="status_insecure">Insecure</label>
                        <label index="status_disabled">Disabled</label>
                        <label index="status_enabled">Enabled</label>
+                       <label index="status_enabledPermanently">Enabled permanently</label>
+                       <label index="status_enabledTemporarily">Enabled temporarily</label>
                        <label index="status_empty">Empty</label>
                        <label index="status_connectionFailed">Connection Failed</label>
                        <label index="status_updateComplete">Update Complete</label>
@@ -42,6 +44,7 @@
                        <label index="status_phpRegisterGlobalsHowToChange">how to change configuration settings</label>
                        <label index="status_phpRegisterGlobalsPHPManual">The PHP manual has instructions for %s.</label>
                        <label index="status_webServer">Web Server</label>
+                       <label index="status_installEnabledTemporarily">The Install Tool is temporarily enabled. Delete the file &quot;%s&quot; when you have finished setting up TYPO3. If not used the Install Tool will be disabled automatically in %s minutes.</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file
index e88251f..eaa8d85 100644 (file)
@@ -248,19 +248,49 @@ class tx_reports_reports_status_SecurityStatus implements tx_reports_StatusProvi
 
                $enableInstallToolFileExists = is_file($enableInstallToolFile);
 
-               if ($enableInstallToolFileExists && trim(file_get_contents($enableInstallToolFile)) === 'KEEP_FILE') {
-                       $value    = $GLOBALS['LANG']->getLL('status_enabled');
-                       $severity = tx_reports_reports_status_Status::WARNING;
+               if ($enableInstallToolFileExists) {
 
-                       $disableInstallToolUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
-                               . '&amp;adminCmd=remove_ENABLE_INSTALL_TOOL';
+                       if (trim(file_get_contents($enableInstallToolFile)) === 'KEEP_FILE') {
 
-                       $message = sprintf(
-                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled'),
-                               '<span style="white-space: nowrap;">' . $enableInstallToolFile . '</span>');
-                       $message .= ' <a href="' . $disableInstallToolUrl . '">'
-                               . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd')
-                               . '</a>';
+                               $severity = tx_reports_reports_status_Status::WARNING;
+
+                               $disableInstallToolUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
+                                       . '&amp;adminCmd=remove_ENABLE_INSTALL_TOOL';
+
+                               $value    = $GLOBALS['LANG']->getLL('status_enabledPermanently');
+
+                               $message = sprintf(
+                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled'),
+                                       '<span style="white-space: nowrap;">' . $enableInstallToolFile . '</span>');
+                               $message .= ' <a href="' . $disableInstallToolUrl . '">'
+                                       . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd')
+                                       . '</a>';
+
+                       } else {
+
+                               $enableInstallToolFileTtl = filemtime($enableInstallToolFile) + 3600 - time();
+
+                               if ($enableInstallToolFileTtl <= 0) {
+
+                                       unlink($enableInstallToolFile);
+
+                               } else {
+
+                                       $severity = tx_reports_reports_status_Status::NOTICE;
+
+                                       $disableInstallToolUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
+                                               . '&amp;adminCmd=remove_ENABLE_INSTALL_TOOL';
+
+                                       $value = $GLOBALS['LANG']->getLL('status_enabledTemporarily');
+
+                                       $message = sprintf(
+                                               $GLOBALS['LANG']->getLL('status_installEnabledTemporarily'),
+                                               '<span style="white-space: nowrap;">' . $enableInstallToolFile . '</span>', floor($enableInstallToolFileTtl/60) );
+                                       $message .= ' <a href="' . $disableInstallToolUrl . '">'
+                                               . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd')
+                                               . '</a>';
+                               }
+                       }
                }
 
                return t3lib_div::makeInstance('tx_reports_reports_status_Status',