Fixed bug #17057: StateProvider values not respected
authorSteffen Kamper <info@sk-typo3.de>
Sat, 5 Feb 2011 23:38:04 +0000 (23:38 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 5 Feb 2011 23:38:04 +0000 (23:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-5@10397 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php

index 70a78e3..cab8f8e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 
 2011-02-05  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #17057: StateProvider values not respected
        * Fixed bug #17493: Filelist misses open folder icon
        * Fixed bug #17490: After introducing the locking in #17289 no CSRF token will ever be deleted (Thanks to Helmut Hummel)
 
index 0ba2219..43c97cc 100644 (file)
@@ -102,14 +102,7 @@ class TYPO3backend {
                $this->pageRenderer->loadExtJS();
                $this->pageRenderer->enableExtJSQuickTips();
 
-               $this->pageRenderer->addExtOnReadyCode(
-                       'TYPO3.Backend = new TYPO3.Viewport(TYPO3.Viewport.configuration);
-                       if (typeof console === "undefined") {
-                               console = TYPO3.Backend.DebugConsole;
-                       }
-                       TYPO3.ContextHelpWindow.init();',
-                       TRUE
-               );
+
                $this->pageRenderer->addJsInlineCode(
                        'consoleOverrideWithDebugPanel',
                        '//already done'
@@ -264,12 +257,19 @@ class TYPO3backend {
                        //save states in BE_USER->uc
                $extOnReadyCode = '
                        Ext.state.Manager.setProvider(new TYPO3.state.ExtDirectProvider({
-                               key: "BackendComponents.States"
+                               key: "BackendComponents.States",
+                               autoRead: false
                        }));
                ';
                if ($states) {
-                   $extOnReadyCode .= 'Ext.state.Manager.getProvider().initState(' . $states . ');';
+                       $extOnReadyCode .= 'Ext.state.Manager.getProvider().initState(' . json_encode($states) . ');';
                }
+               $extOnReadyCode .= '
+                       TYPO3.Backend = new TYPO3.Viewport(TYPO3.Viewport.configuration);
+                       if (typeof console === "undefined") {
+                               console = TYPO3.Backend.DebugConsole;
+                       }
+                       TYPO3.ContextHelpWindow.init();';
                $this->pageRenderer->addExtOnReadyCode($extOnReadyCode);