MFB: Start output compression conditionally (Bug #7769).
authorJan Schneider <jan@horde.org>
Wed, 12 Aug 2009 22:45:52 +0000 (00:45 +0200)
committerJan Schneider <jan@horde.org>
Wed, 12 Aug 2009 22:45:52 +0000 (00:45 +0200)
chora/lib/base.php
ingo/lib/base.php
kronolith/lib/base.php
nag/lib/base.php
turba/lib/base.php

index 7b7435c..c193f37 100644 (file)
@@ -4,6 +4,9 @@
  *
  * This file brings in all of the dependencies that every Chora script
  * will need, and sets up objects that all scripts use.
+ *
+ * The following global variables are used:
+ *   $no_compress  -  Controls whether the page should be compressed
  */
 
 $chora_dir = dirname(__FILE__);
@@ -47,4 +50,6 @@ $notification->attach('status');
 Chora::initialize();
 
 // Start compression.
-Horde::compressOutput();
+if (!Util::nonInputVar('no_compress')) {
+    Horde::compressOutput();
+}
index 5a29e39..d8522be 100644 (file)
@@ -15,6 +15,7 @@
  * Global variables defined:
  *   $ingo_shared  - TODO
  *   $ingo_storage - The Ingo_Storage:: object to use for storing rules.
+ *   $no_compress  - Controls whether the page should be compressed
  *
  * See the enclosed file LICENSE for license information (ASL).  If you
  * did not receive this file, see http://www.horde.org/licenses/asl.php.
@@ -44,7 +45,9 @@ $notification = Horde_Notification::singleton();
 $notification->attach('status');
 
 // Start compression.
-Horde::compressOutput();
+if (!Util::nonInputVar('no_compress')) {
+    Horde::compressOutput();
+}
 
 // Load the Ingo_Storage driver. It appears in the global variable
 // $ingo_storage.
index 68ae6f5..75c4e2a 100644 (file)
@@ -14,6 +14,7 @@
  *   'none' - Do not start a session
  *   'readonly' - Start session readonly
  *   [DEFAULT] - Start read-write session
+ * $no_compress - Controls whether the page should be compressed
  * </pre>
  *
  * @package Kronolith
@@ -51,7 +52,9 @@ $notification = Horde_Notification::singleton();
 $GLOBALS['kronolith_notify'] = $notification->attach('status', null, 'Kronolith_Notification_Listener_Status');
 
 /* Start compression. */
-Horde::compressOutput();
+if (!Util::nonInputVar('no_compress')) {
+    Horde::compressOutput();
+}
 
 /* Set the timezone variable, if available. */
 Horde_Nls::setTimeZone();
index 69c21f9..760ff8a 100644 (file)
@@ -4,6 +4,9 @@
  *
  * This file brings in all of the dependencies that every Nag
  * script will need and sets up objects that all scripts use.
+ *
+ * The following global variables are used:
+ *   $no_compress  -  Controls whether the page should be compressed
  */
 
 // Determine BASE directories.
@@ -38,7 +41,9 @@ $notification = Horde_Notification::singleton();
 $notification->attach('status', null, 'Nag_Notification_Listener_Status');
 
 // Start compression.
-Horde::compressOutput();
+if (!Util::nonInputVar('no_compress')) {
+    Horde::compressOutput();
+}
 
 // Set the timezone variable.
 Horde_Nls::setTimeZone();
index 3d55358..0679217 100644 (file)
@@ -10,6 +10,7 @@
  * $ingo_authentication - The type of authentication to use:
  *   'none'  - Do not authenticate
  *   [DEFAULT] - Authenticate; on failed auth redirect to login screen
+ * $no_compress - Controls whether the page should be compressed
  * </pre>
  */
 
@@ -97,4 +98,6 @@ foreach ($copymoveSources as $key => $curSource) {
 $GLOBALS['addSources'] = $addSources;
 
 // Start compression, if requested.
-Horde::compressOutput();
+if (!Util::nonInputVar('no_compress')) {
+    Horde::compressOutput();
+}