From 2738030be5b06a8ef5e5bd8a4ccd0a5ce02cf48d Mon Sep 17 00:00:00 2001 From: Susanne Moog Date: Fri, 16 Apr 2010 15:59:48 +0000 Subject: [PATCH] Fixed bug #13630: Status Report reports "Install Tool: disabled" when it is not. (thanks to Gregor Hermens) git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7376 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 6 ++- typo3/sysext/reports/reports/locallang.xml | 3 ++ ..._reports_reports_status_securitystatus.php | 52 +++++++++++++++---- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2dda5a8f6279..3799e1a68fa6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-13 Susanne Moog + + * Fixed bug #13630: Status Report reports "Install Tool: disabled" when it is not. (thanks to Gregor Hermens) + 2010-04-16 Francois Suter * 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 - * 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 diff --git a/typo3/sysext/reports/reports/locallang.xml b/typo3/sysext/reports/reports/locallang.xml index 6d659defa913..e47f971b063d 100644 --- a/typo3/sysext/reports/reports/locallang.xml +++ b/typo3/sysext/reports/reports/locallang.xml @@ -13,6 +13,8 @@ + + @@ -42,6 +44,7 @@ + \ No newline at end of file diff --git a/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php b/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php index e88251f4bed9..eaa8d85d9ac7 100644 --- a/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php +++ b/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php @@ -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') - . '&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'), - '' . $enableInstallToolFile . ''); - $message .= ' ' - . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd') - . ''; + $severity = tx_reports_reports_status_Status::WARNING; + + $disableInstallToolUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL') + . '&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'), + '' . $enableInstallToolFile . ''); + $message .= ' ' + . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd') + . ''; + + } 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') + . '&adminCmd=remove_ENABLE_INSTALL_TOOL'; + + $value = $GLOBALS['LANG']->getLL('status_enabledTemporarily'); + + $message = sprintf( + $GLOBALS['LANG']->getLL('status_installEnabledTemporarily'), + '' . $enableInstallToolFile . '', floor($enableInstallToolFileTtl/60) ); + $message .= ' ' + . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd') + . ''; + } + } } return t3lib_div::makeInstance('tx_reports_reports_status_Status', -- 2.20.1