[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:08:30 +0000 (08:08 +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/8880
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/class.t3lib_pagerenderer.php

index d7377a0..3e13c04 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,