* Fixed bug #5788: Add a delete button to the yellow warning box for removing the...
authorMichael Stucki <michael.stucki@typo3.org>
Sun, 2 Mar 2008 00:11:44 +0000 (00:11 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Sun, 2 Mar 2008 00:11:44 +0000 (00:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3337 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php
typo3/sysext/lang/locallang_core.xml

index ea68136..f0f0e35 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-03-02  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #7291: Taskcenter -> sys_action - viewport is too small when creating records (patch by Steffen Kamper)
+       * Fixed bug #5788: Add a delete button to the yellow warning box for removing the ENABLE_INSTALL_TOOL_FILE
 
 2008-03-01  Dmitry Dulepov  <dmitry@typo3.org>
 
index 5d94ccb..304f066 100755 (executable)
@@ -3881,7 +3881,17 @@ class t3lib_BEfunc       {
         */
        function displayWarningMessages()       {
                if ($GLOBALS['BE_USER']->isAdmin())     {
-                       $warnings = array();
+                       $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
+
+                       $cmd = t3lib_div::_GET('adminWarning_cmd');     // Cleanup command, if set
+                       switch($cmd) {
+                               case 'remove_ENABLE_INSTALL_TOOL':
+                                       if (unlink($enableInstallToolFile)) {
+                                               unset($enableInstallToolFile);
+                                       }
+                               break;
+                       }
 
                                // Check if the Install Tool Password is still default: joh316
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']==md5('joh316'))    {
@@ -3901,15 +3911,15 @@ class t3lib_BEfunc      {
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_admin'),
                                        '<a href="'.$url.'">',
                                        '</a>');
-                               
+
                        }
 
-                               // Check if the Install Tool is enabled
-                       $enableInstallToolFile = PATH_site.'typo3conf/ENABLE_INSTALL_TOOL';
                        if (@is_file($enableInstallToolFile))   {
-                               $warnings["install_enabled"] = sprintf(
+                               $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'),
-                                       $enableInstallToolFile);
+                                       '<span style="white-space:nowrap;">'.$enableInstallToolFile.'</span>');
+                               $warnings['install_enabled'].= ' <a href="'.$url.'">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled_cmd').'</a>';
                        }
 
                                // Check if the encryption key is empty
index dd86319..7af1b5b 100755 (executable)
@@ -192,6 +192,7 @@ Would you like to save now in order to refresh the display?</label>
                        <label index="warning.install_password">The Install Tool is still using the default password &quot;joh316&quot;. Update this within the %sAbout section%s of the Install Tool.</label>
                        <label index="warning.backend_admin">The default backend user "admin" with password &quot;password&quot; is still present. %sEdit this account%s, either deleting it completely or changing the username and password.</label>
                        <label index="warning.install_enabled">The Install Tool is enabled. Delete the file &quot;%s&quot; when you have finished setting up TYPO3.</label>
+                       <label index="warning.install_enabled_cmd">Click to remove the file now!</label>
                        <label index="warning.install_encryption">The encryption key is not set. Set it in the %sBasic Configuration section%s of the Install Tool.</label>
                        <label index="warning.install_update">This installation is not configured for the TYPO3 version it is running. If you did so intentionally, this message can be safely ignored. If you are unsure, visit the %sUpdate Wizard%s section of the Install Tool to see how TYPO3 would change.</label>
                        <label index="warning.backend_reference">The Reference Index table is empty which is likely the result of a recent TYPO3 upgrade. Please go to %sTools&gt;DB Check%s and update the reference index.</label>