[Openfirst-cvscommit] SF.net SVN: openfirst: [208] trunk/src/includes/globals.php
Brought to you by:
xtimg
|
From: <ast...@us...> - 2006-07-04 14:06:09
|
Revision: 208 Author: astronouth7303 Date: 2006-07-04 07:06:05 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=208&view=rev Log Message: ----------- Add optional $ogCompress, defaulting to true. Modified Paths: -------------- trunk/src/includes/globals.php Modified: trunk/src/includes/globals.php =================================================================== --- trunk/src/includes/globals.php 2006-07-04 14:04:45 UTC (rev 207) +++ trunk/src/includes/globals.php 2006-07-04 14:06:05 UTC (rev 208) @@ -105,17 +105,6 @@ set_include_path( get_include_path().PATH_SEPARATOR."$configdir/".PATH_SEPARATOR."."); unset($configdir); -// Enable output compression, if zlib is available and no output has been sent -if ( function_exists('ob_gzhandler') && - !ini_get('zlib.output_compression') && - !headers_sent() - ) { - @ob_start('ob_gzhandler'); // If already compressing, shut up. - header('x-of-compressing: yes'); -} else if (!headers_sent()) { - header('x-of-compressing: no'); -} - require_once('functions.php'); // This should been done at the earliest possible time. // Which is now. @@ -136,6 +125,8 @@ $ogMoreHeadItems = array(); $ogMoreStyles = ''; +$ogCompress = true; + if (!defined('OPENFIRST_NO_INSTALLATION')) { $ogSQLTablePrefix = 'ofirst_'; $ogDataBaseType = dbMYSQL; @@ -146,6 +137,18 @@ require_once('sitesettings.php'); } +// Enable output compression, if zlib is available and no output has been sent +if ( !function_exists('ob_gzhandler') && + !ini_get('zlib.output_compression') && + !headers_sent() && + $ogCompress + ) { + @ob_start('ob_gzhandler'); // If already compressing, shut up. + header('x-of-compressing: yes'); +} else if (!headers_sent()) { + header('x-of-compressing: no'); +} + if (!defined('OPENFIRST_NO_INSTALLATION')) { $ogDB = ofCreateDataBase($ogDataBaseType, $ogSQLServer, $ogSQLUser, $ogSQLPassword); if (!defined('OPENFIRST_INSTALLATION_SCRIPT')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |