[BUGFIX] Fix Extension Download with compressionLevel enabled
authorSteffen Gebert <steffen.gebert@typo3.org>
Thu, 24 Mar 2011 21:22:10 +0000 (22:22 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Mon, 28 Mar 2011 19:26:13 +0000 (21:26 +0200)
To clear output buffers, the utility function t3lib_div::cleanOutputBuffers()
has to be used. Otherwise things break with compressionLevel enabled.

This change replaces the ob_end_clean() call in the Extension download process,
which did not work, as crap is sent to the user agent.

Change-Id: I078bab66c24d0667b3cd8c2397f26569ed2dbf8d
Resolves: #M18029
Also-Applies: TYPO3_4-5
Reviewed-on: http://review.typo3.org/1264
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/em/classes/index.php

index d5136ca..ee58a13 100644 (file)
@@ -2220,7 +2220,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        $backUpData = $this->terConnection->makeUploadDataFromarray($uArr);
                        $filename = 'T3X_' . $extKey . '-' . str_replace('.', '_', $extInfo['EM_CONF']['version']) . '-z-' . date('YmdHi') . '.t3x';
                        if (intval($this->CMD['doBackup']) == 1) {
-                               ob_end_clean();
+                               t3lib_div::cleanOutputBuffers();
                                header('Content-Type: application/octet-stream');
                                header('Content-Disposition: attachment; filename=' . $filename);
                                echo $backUpData;