[TYPO3-core] RFC: #11731: [Bugfix] ENABLE_INSTALL_TOOL file check in yellow box doesn't check the file age

Moreno Feltscher moreno at luagsh.ch
Mon Aug 17 01:58:15 CEST 2009


This is an SVN patch request.

Type: Bugfix (no-brainer?)

Bugtracker references:
http://bugs.typo3.org/view.php?id=11731

Branches:
TYPO3_4-1, TYPO3_4-2, trunk

Problem:
With RFC #11368 a new file age check was implemented by Michael Stucki.  
After one hour inactivity time using the install tool, the  
ENABLE_INSTALL_TOOL file will automatically be deleted by the system and  
you have to create this file if you want to use the install tool.
The yellow box on the "About" module doesn't care about this new feature  
and will always show a message about the ENABLE_INSTALL_TOOL file if it  
exists.
In my eyes this is a little nobrainer.

Solution:
Add the file age check also to class.t3lib_befunc.php


Cheers
Moreno


--- t3lib/class.t3lib_befunc.php	2009-08-07 21:31:55.000000000 +0200
+++ t3lib/class.t3lib_befunc.php	2009-08-07 21:31:33.000000000 +0200
@@ -4020,7 +4020,7 @@
  	public static function displayWarningMessages() {
  		if ($GLOBALS['BE_USER']->isAdmin()) {
  			$warnings = array();	// Array containing warnings that must be  
displayed
-			$enableInstallToolFile = PATH_site.'typo3conf/ENABLE_INSTALL_TOOL';	//  
If this file exists, the Install Tool is enabled
+			$enableInstallToolFile = PATH_site .  
'typo3conf/ENABLE_INSTALL_TOOL';	// If this file exists and it isn't older  
than one hour, the Install Tool is enabled

  			$cmd = t3lib_div::_GET('adminWarning_cmd');	// Cleanup command, if set
  			switch($cmd) {
@@ -4053,7 +4053,7 @@
  			}
  			$GLOBALS['TYPO3_DB']->sql_free_result($res);

-			if (@is_file($enableInstallToolFile)) {
+			if (is_file($enableInstallToolFile) && (time() -  
filemtime($enableInstallToolFile) < 3600)) {
  				$url =  
t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT').'?adminWarning_cmd=remove_ENABLE_INSTALL_TOOL';
  				$warnings['install_enabled'] = sprintf(
  					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled'),


More information about the TYPO3-team-core mailing list