Added feature #11391: Add a button to let admins create the file ENABLE_INSTALL_TOOL...
authorMichael Stucki <michael.stucki@typo3.org>
Mon, 29 Jun 2009 15:36:41 +0000 (15:36 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Mon, 29 Jun 2009 15:36:41 +0000 (15:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5660 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 3f6e616..5535166 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-29  Michael Stucki  <michael@typo3.org>
+
+       * Added feature #11391: Add a button to let admins create the file ENABLE_INSTALL_TOOL from the backend (since it is automatically removed after 1 hour since this version)
+
 2009-06-29  Steffen Kamper  <info@sk-typo3.de>
 
        * Followup to #9991: one checkbox in version module was accidental deleted
index 9254d5c..0760624 100755 (executable)
@@ -262,6 +262,17 @@ class SC_mod_user_setup_index {
        function main() {
                global $BE_USER,$LANG,$BACK_PATH,$TBE_MODULES;
 
+               
+                       // file creation / delete
+               if ($this->isAdmin) {
+                       if (t3lib_div::_POST('deleteInstallToolEnableFile')) {
+                               unlink(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                       }
+                       if (t3lib_div::_POST('createInstallToolEnableFile')) {
+                               touch(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                       }
+               }
+               
                if ($this->languageUpdate) {
                        $this->doc->JScodeArray['languageUpdate'] .=  '
                                if (top.refreshMenu) {
@@ -313,6 +324,23 @@ class SC_mod_user_setup_index {
                        <input type="submit" name="data[setValuesToDefault]" value="'.$LANG->getLL('setToStandard').'" onclick="return confirm(\''.$LANG->getLL('setToStandardQuestion').'\');" />'
                );
 
+                       // Install Tool access file
+               if ($this->isAdmin) {
+                       $installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+                       $installToolEnableButton = $installToolEnableFileExists ?
+                               '<input type="submit" name="deleteInstallToolEnableFile" value="' . $LANG->getLL('enableInstallTool.deleteFile') . '" />' :
+                               '<input type="submit" name="createInstallToolEnableFile" value="' . $LANG->getLL('enableInstallTool.createFile') . '" />';
+
+                       $this->content .= $this->doc->spacer(30);
+                       $this->content .= $this->doc->section($LANG->getLL('enableInstallTool.headerTitle'),
+                               $LANG->getLL('enableInstallTool.description')
+                       );
+                       $this->content .= $this->doc->spacer(10);
+                       $this->content .= $this->doc->section('',
+                               $installToolEnableButton
+                       );
+               }
+
                        // Notice
                $this->content .= $this->doc->spacer(30);
                $this->content .= $this->doc->section('', $LANG->getLL('activateChanges'));
index e72e6df..0d6b3e6 100755 (executable)
                        <label index="newPassword_ok">Password was updated</label>
                        <label index="newPassword_failed">Password was NOT updated because you didn't enter the same password twice.</label>
                        <label index="adminFunctions">Admin functions</label>
+                       <label index="enableInstallTool.headerTitle">Admin control for re-enabling Install Tool access</label>
+                       <label index="enableInstallTool.description">By clicking this button, a file typo3conf/ENABLE_INSTALL_TOOL is created (or removed if it already exists).&lt;br /&gt;It unlocks the access to the Install Tool (password is still needed!) and will be removed automatically after 1 hour.</label>
+                       <label index="enableInstallTool.createFile">Create Install Tool Enable File</label>
+                       <label index="enableInstallTool.deleteFile">Delete Install Tool Enable File</label>
                </languageKey>
        </data>
 </T3locallang>