Fixed bug #13832: Wrong flash message when clearing temporary data
authorFrancois Suter <francois.suter@typo3.org>
Fri, 26 Mar 2010 16:31:38 +0000 (16:31 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Fri, 26 Mar 2010 16:31:38 +0000 (16:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7188 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index e331d10..d2352ec 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
        * Follow-up to #13678: Removed cleanup of recipient_copy which is now unused
        * Fixed bug #13920: Removed unused property $additionalStyleSheets in template.php (thanks to Steffen Gebert)
        * Fixed bug #12202: "Clear temporary data" in setup module misses JS confirm (thanks to Søren Malling)
+       * Fixed bug #13832: Wrong flash message when clearing temporary data (thanks to Søren Malling)
 
 2010-03-25  Ernesto Baschny  <ernst@cron-it.de>
 
index 7003827..0903613 100755 (executable)
@@ -115,6 +115,7 @@ class SC_mod_user_setup_index {
        protected $passwordIsUpdated = FALSE;
        protected $passwordIsSubmitted = FALSE;
        protected $setupIsUpdated = FALSE;
+       protected $tempDataIsCleared = FALSE;
 
 
        /******************************
@@ -159,6 +160,7 @@ class SC_mod_user_setup_index {
                                                unset ($BE_USER->uc[$key]);
                                        }
                                }
+                               $this->tempDataIsCleared = TRUE;
                        } else {
                                        // save all submitted values if they are no array (arrays are with table=be_users) and exists in $GLOBALS['TYPO3_USER_SETTINGS'][columns]
                                foreach($columns as $field => $config) {
@@ -185,6 +187,10 @@ class SC_mod_user_setup_index {
                                $BE_USER->writelog(254, 1, 0, 1, 'Personal settings changed', array());
                                $this->setupIsUpdated = TRUE;
                        }
+                               // If the temporary data has been cleared, lets make a log note about it
+                       if ($this->tempDataIsCleared) {
+                               $BE_USER->writelog(254, 1, 0, 1, $GLOBALS['LANG']->getLL('tempDataClearedLog'), array());
+                       }
 
 
                                // Personal data for the users be_user-record (email, name, password...)
@@ -334,6 +340,15 @@ class SC_mod_user_setup_index {
                        );
                        $this->content .= $flashMessage->render();
                }
+                       // Show if temporary data was cleared
+               if ($this->tempDataIsCleared) {
+                       $flashMessage = t3lib_div::makeInstance(
+                               't3lib_FlashMessage',
+                               $LANG->getLL('tempDataClearedFlashMessage'),
+                               $LANG->getLL('tempDataCleared')
+                       );
+                       $this->content .= $flashMessage->render();
+               }
                        // If password is updated, output whether it failed or was OK.
                if ($this->passwordIsSubmitted) {
                        if ($this->passwordIsUpdated) {
index a108436..64efeed 100755 (executable)
                        <label index="enableInstallTool.label">Install Tool Access</label>
                        <label index="enableInstallTool.createFile">Create Install Tool Enable File</label>
                        <label index="enableInstallTool.deleteFile">Delete Install Tool Enable File</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>
                </languageKey>
        </data>
 </T3locallang>