Fixed bug #11994: Add more Flexibility to PageRenderer
authorSteffen Kamper <info@sk-typo3.de>
Mon, 21 Sep 2009 22:51:34 +0000 (22:51 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 21 Sep 2009 22:51:34 +0000 (22:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6029 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php

index e484ab2..a78f805 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-22  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #11994: Add more Flexibility to PageRenderer
+
 2009-09-21  Sebastian Kurfuerst  <sebastian@typo3.org>
 
        * Raised extbase version to 0.9.8. This is a follow-up to bug #11903 and additionally makes the reflection cache work.
index 90bb9bc..16da29b 100644 (file)
@@ -1174,6 +1174,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                $this->jsFiles[$this->backPath . 'contrib/extjs/ext-all.js'], $this->jsFiles[$this->backPath . 'contrib/extjs/ext-all-debug.js']
                        );
                }
+               
+               $inlineSettings = $this->inlineLanguageLabels ? 'TYPO3.lang = ' . json_encode($this->inlineLanguageLabels) . ';' : '';
+               $inlineSettings .= $this->inlineSettings ? 'TYPO3.settings = ' . json_encode($this->inlineSettings) . ';' : '';
+               
                if ($this->addExtCore || $this->addExtJS) {
                                // set clear.gif, move it on top, add handler code
                        $code = '';
@@ -1186,7 +1190,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        $out .= $this->inlineJavascriptWrap[0] . '
                                Ext.ns("TYPO3");
                                Ext.BLANK_IMAGE_URL = "' . htmlspecialchars(t3lib_div::locationHeaderUrl($this->backPath . 'gfx/clear.gif')) . '";' . chr(10) . 
-                               'TYPO3.lang = ' . json_encode($this->inlineLanguageLabels) . ';' . 'TYPO3.settings = ' . json_encode($this->inlineSettings) . ';' .
+                               $inlineSettings .
                                'Ext.onReady(function() {' .
                                ($this->enableExtJSQuickTips ? 'Ext.QuickTips.init();' . chr(10) : '') . $code .
                                ' });' . $this->inlineJavascriptWrap[1];
@@ -1206,7 +1210,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                        $this->addCssFile($this->backPath . 'contrib/extjs/resources/css/ext-all-notheme.css', 'stylesheet', 'screen', '', FALSE, TRUE);
                                }
                        }
-
+               } else {
+                       if ($inlineSettings) {
+                               $out .= $this->inlineJavascriptWrap[0] . $inlineSettings . $this->inlineJavascriptWrap[1];
+               }
                }
 
                return $out;
@@ -1258,7 +1265,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        // use extern compress routine
                        $params = array (
                                'jsInline'        => &$this->jsInline, 
-                               'jsFooterInline'  => &$this->jsFooterInline
+                               'jsFooterInline'  => &$this->jsFooterInline,
+                               'jsLibs'          => &$this->jsLibs, 
+                               'jsFiles'         => &$this->jsFiles, 
+                               'jsFooterFiles'   => &$this->jsFiles, 
                        );
                        t3lib_div::callUserFunction($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['jsCompressHandler'], $params, $this);
                } else {
@@ -1283,7 +1293,8 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                if ($this->compressCss && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler']) {
                                // use extern compress routine
                        $params = array (
-                               'cssInline' => &$this->cssInline
+                               'cssInline' => &$this->cssInline,
+                               'cssFiles'  => &$this->cssFiles,
                        );
                        t3lib_div::callUserFunction($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler'], $params, $this);
                } else {