From: Jan Schneider Date: Wed, 12 Aug 2009 22:45:52 +0000 (+0200) Subject: MFB: Start output compression conditionally (Bug #7769). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cc5e798aa47467477d1574428bbf77030d221562;p=horde.git MFB: Start output compression conditionally (Bug #7769). --- diff --git a/chora/lib/base.php b/chora/lib/base.php index 7b7435ca8..c193f371d 100644 --- a/chora/lib/base.php +++ b/chora/lib/base.php @@ -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(); +} diff --git a/ingo/lib/base.php b/ingo/lib/base.php index 5a29e3973..d8522bee8 100644 --- a/ingo/lib/base.php +++ b/ingo/lib/base.php @@ -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. diff --git a/kronolith/lib/base.php b/kronolith/lib/base.php index 68ae6f515..75c4e2ac5 100644 --- a/kronolith/lib/base.php +++ b/kronolith/lib/base.php @@ -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 * * * @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(); diff --git a/nag/lib/base.php b/nag/lib/base.php index 69c21f9a7..760ff8ab2 100644 --- a/nag/lib/base.php +++ b/nag/lib/base.php @@ -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(); diff --git a/turba/lib/base.php b/turba/lib/base.php index 3d553584c..067921717 100644 --- a/turba/lib/base.php +++ b/turba/lib/base.php @@ -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 * */ @@ -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(); +}