Added feature #11242: Clear User Session Data
authorSteffen Kamper <info@sk-typo3.de>
Sat, 5 Sep 2009 14:31:17 +0000 (14:31 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 5 Sep 2009 14:31:17 +0000 (14:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5898 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 1ed6dc1..8a4bd46 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-09-05  Steffen Kamper  <info@sk-typo3.de>
 
+       * Added feature #11242: Clear User Session Data
        * Added feature #11812: Resizable Textareas for TCEforms
        * Added feature #11407: Allow type="user" in user setup
 
index 5a738e5..cc29dc3 100755 (executable)
@@ -149,6 +149,12 @@ class SC_mod_user_setup_index {
                        if ($d['setValuesToDefault']) {
                                        // If every value should be default
                                $BE_USER->resetUC();
+                       } elseif ($d['clearSessionVars']) {
+                               foreach ($BE_USER->uc as $key => $value) {
+                                       if (!isset($columns[$key])) {
+                                               unset ($BE_USER->uc[$key]);
+                                       }
+                               }
                        } 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) {
@@ -320,7 +326,8 @@ class SC_mod_user_setup_index {
                        t3lib_BEfunc::cshItem('_MOD_user_setup', 'reset', $BACK_PATH) . '
                        <input type="hidden" name="simUser" value="'.$this->simUser.'" />
                        <input type="submit" name="submit" value="'.$LANG->getLL('save').'" />
-                       <input type="submit" name="data[setValuesToDefault]" value="'.$LANG->getLL('setToStandard').'" onclick="return confirm(\''.$LANG->getLL('setToStandardQuestion').'\');" />'
+                       <input type="submit" name="data[setValuesToDefault]" value="'.$LANG->getLL('resetConfiguration').'" onclick="return confirm(\''.$LANG->getLL('setToStandardQuestion').'\');" />
+                       <input type="submit" name="data[clearSessionVars]" value="'.$LANG->getLL('clearSessionVars').'" />'
                );
 
                        // Install Tool access file
index 0d6b3e6..c451298 100755 (executable)
@@ -83,7 +83,9 @@
                        <label index="edit_functions">Edit</label>
                        <label index="disableCMlayers">Disable Popup Context Menus</label>
                        <label index="setToStandard">Reset all Values to default</label>
+                       <label index="resetConfiguration">Reset Configuration and Clear Temporary Data</label>
                        <label index="setToStandardQuestion">Are you sure you want to reset all values to default?</label>
+                       <label index="clearSessionVars">Clear Temporary Data</label>
                        <label index="functions">Advanced functions</label>
                        <label index="copyLevels">&lt;b&gt;Recursive Copy:&lt;/b&gt; Enter the number of page&lt;br /&gt;sublevels to include, when a page is copied</label>
                        <label index="recursiveDelete">&lt;b&gt;Recursive Delete(!):&lt;/b&gt; Allow ALL subpages&lt;br /&gt;to be deleted when deleting a page</label>