Fixed bug #17464: ExtDirectCode is added twice
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_pagerenderer.php
index feb774c..28bf3b6 100644 (file)
@@ -111,7 +111,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        protected $addExtJS = FALSE;
        protected $addExtCore = FALSE;
        protected $extJSadapter = 'ext/ext-base.js';
-
+       protected $extDirectCodeAdded = FALSE;
 
        protected $enableExtJsDebug = FALSE;
        protected $enableExtCoreDebug = FALSE;
@@ -139,7 +139,6 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        protected $addSvg = FALSE;
        protected $enableSvgDebug = FALSE;
 
-
                // used by BE modules
        public $backPath;
 
@@ -945,6 +944,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @return void
         */
        public function addExtDirectCode() {
+               if ($this->extDirectCodeAdded) {
+                       return;
+               }
+               $this->extDirectCodeAdded = TRUE;
                $token = '';
                if (TYPO3_MODE === 'BE') {
                        $formprotection = t3lib_formprotection_Factory::get();