Project

General

Profile

Bug #21223 ยป 12175.diff

Administrator Admin, 2009-10-10 01:53

View differences:

typo3/sysext/setup/mod/index.php (working copy)
}
/**
*
*
* @param array $params config of the field
* @param SC_mod_user_setup_index $parent this class as reference
* @return string html with description and button
*/
public function renderInstallToolEnableFileButton(array $params, SC_mod_user_setup_index $parent) {
// Install Tool access file
$installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
// Install Tool access file
$installToolEnableFile = PATH_typo3conf . 'ENABLE_INSTALL_TOOL';
$installToolEnableFileExists = is_file($installToolEnableFile);
if ($installToolEnableFileExists && (time() - filemtime($installToolEnableFile) > 3600)) {
$content = file_get_contents($installToolEnableFile);
$verifyString = 'KEEP_FILE';
if (trim($content) !== $verifyString) {
// Delete the file if it is older than 3600s (1 hour)
unlink($installToolEnableFile);
$installToolEnableFileExists = FALSE;
}
}
if ($installToolEnableFileExists) {
return '<input type="submit" name="deleteInstallToolEnableFile" value="' . $GLOBALS['LANG']->sL('LLL:EXT:setup/mod/locallang.xml:enableInstallTool.deleteFile') . '" />';
} else {
    (1-1/1)