[BUGFIX] Prevent compression of scripts that use ajax.php
authorSteffen Kamper <info@sk-typo3.de>
Tue, 11 Oct 2011 12:49:08 +0000 (14:49 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 7 Feb 2012 07:06:38 +0000 (08:06 +0100)
When registering ajax calls, a pseudo JS file is registered within the
pageRenderer with a source like 'ajax.php?parameters'.

As it does not make sense to compress or concatenate those pseudo JS files,
the pageRenderer should ensure they are properly included.

Change-Id: I386663b9ea77426ea3d8e804eac0f3c8ca72cd7a
Fixes: #24274
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/5721
Reviewed-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Philipp Gampe
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/class.t3lib_pagerenderer.php

index 67eeab5..0c2df65 100644 (file)
@@ -933,6 +933,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        $type = 'text/javascript';
                }
                if (!isset($this->jsFiles[$file])) {
+                       if (strpos($file, 'ajax.php?') !== FALSE) {
+                               $compress = FALSE;
+                       }
                        $this->jsFiles[$file] = array(
                                'file' => $file,
                                'type' => $type,
@@ -961,6 +964,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        $type = 'text/javascript';
                }
                if (!isset($this->jsFiles[$file])) {
+                       if (strpos($file, 'ajax.php?') !== FALSE) {
+                               $compress = FALSE;
+                       }
                        $this->jsFiles[$file] = array(
                                'file' => $file,
                                'type' => $type,
@@ -2109,4 +2115,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagerenderer.php']);
 }
 
-?>
\ No newline at end of file
+?>