Fixed bug #14343 - Flash message when install tool enable file has been deleted/creat...
authorSteffen Kamper <info@sk-typo3.de>
Sat, 15 May 2010 23:10:44 +0000 (23:10 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 15 May 2010 23:10:44 +0000 (23:10 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7620 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/setup/mod/index.php
typo3/sysext/setup/mod/locallang.xml

index bfbc2f6..49bb447 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
+2010-05-16  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #14343 - Flash message when install tool enable file has been deleted/created (thanks to Jigal van Hemert)
+
 2010-05-15  Christian Kuhn  <lolli@schwarzbu.ch>
 
-       * Fixed bug #14312: Notice undefined index systemLog and undefined constant TYPO3_ERRORHANDLER_MODE (thanks to Martin Müller)
+       * Fixed bug #14312: Notice undefined index systemLog and undefined constant TYPO3_ERRORHANDLER_MODE (thanks to Martin Mueller)
        * Fixed bug #14309: Notice undefined index "error" & "debug" in index_ts.php (thanks to Martin Müller)
        * Fixed bug #14180: No Message shown when accessing backend if TYPO3_CONF_VARS[BE][adminOnly] = -1 (thanks to Georg Ringer)
 
index d5f31bd..8860041 100755 (executable)
@@ -307,10 +307,44 @@ class SC_mod_user_setup_index {
                if ($this->isAdmin) {
                        if (t3lib_div::_POST('deleteInstallToolEnableFile')) {
                                unlink(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                               $installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                               if ($installToolEnableFileExists) {
+                                       $flashMessage = t3lib_div::makeInstance(
+                                               't3lib_FlashMessage',
+                                               $LANG->getLL('enableInstallTool.fileDelete_failed'),
+                                               $LANG->getLL('enableInstallTool.file'),
+                                               t3lib_FlashMessage::ERROR
+                                       );
+                               } else {
+                                       $flashMessage = t3lib_div::makeInstance(
+                                               't3lib_FlashMessage',
+                                               $LANG->getLL('enableInstallTool.fileDelete_ok'),
+                                               $LANG->getLL('enableInstallTool.file'),
+                                               t3lib_FlashMessage::OK
+                                       );
+                       }
+                               $this->content .= $flashMessage->render();
                        }
                        if (t3lib_div::_POST('createInstallToolEnableFile')) {
                                touch(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                               $installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                               if ($installToolEnableFileExists) {
+                                       $flashMessage = t3lib_div::makeInstance(
+                                               't3lib_FlashMessage',
+                                               $LANG->getLL('enableInstallTool.fileCreate_ok'),
+                                               $LANG->getLL('enableInstallTool.file'),
+                                               t3lib_FlashMessage::OK
+                                       );
+                               } else {
+                                       $flashMessage = t3lib_div::makeInstance(
+                                               't3lib_FlashMessage',
+                                               $LANG->getLL('enableInstallTool.fileCreate_failed'),
+                                               $LANG->getLL('enableInstallTool.file'),
+                                               t3lib_FlashMessage::ERROR
+                                       );
                        }
+                               $this->content .= $flashMessage->render();
+               }
                }
 
                if ($this->languageUpdate) {
index 64efeed..83cb33b 100755 (executable)
                        <label index="adminFunctions">Admin functions</label>
                        <label index="enableInstallTool.label">Install Tool Access</label>
                        <label index="enableInstallTool.createFile">Create Install Tool Enable File</label>
+                       <label index="enableInstallTool.file">Install Tool Enable file</label>
+                       <label index="enableInstallTool.fileCreate_ok">The Install Tool Enable file has been created.</label>
+                       <label index="enableInstallTool.fileCreate_failed">The Install Tool Enable file could not be created.</label>
                        <label index="enableInstallTool.deleteFile">Delete Install Tool Enable File</label>
+                       <label index="enableInstallTool.fileDelete_ok">The Install Tool Enable file has been deleted.</label>
+                       <label index="enableInstallTool.fileDelete_failed">The Install Tool Enable file could not be deleted!</label>
                        <label index="tempDataCleared">Temporary data cleared</label>
                        <label index="tempDataClearedFlashMessage">The temporary data has been cleared.</label>
                        <label index="tempDataClearedLog">Temporary data cleared</label>