Skip to content

Commit

Permalink
Attempted fix for #3058: Clicking on view_all_bug_page.php results in…
Browse files Browse the repository at this point in the history
… 'file download' popup

* config_defaults_inc.php
  (g_compress_html): add a note about coflicts with other compression config
    variable in php.ini

* core/compress_api.php
  (compress_is_enabled): add a check for php.ini methods of enabling compression
    so we don't do it twice


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2104 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Mar 15, 2003
1 parent a729bde commit e4dc191
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: config_defaults_inc.php,v 1.112 2003-03-10 09:40:53 int2str Exp $
# $Id: config_defaults_inc.php,v 1.113 2003-03-15 22:09:54 jfitzell Exp $
# --------------------------------------------------------


Expand Down Expand Up @@ -831,6 +831,9 @@
###########################
#----------------------------------
# Use compression of generated html if browser supports it
# If you already have compression enabled in your php.ini file
# (either with zlib.output_compression or
# output_handler=ob_gzhandler) this option will have no effect either way.
$g_compress_html = ON;
#----------------------------------

Expand Down
6 changes: 4 additions & 2 deletions core/compress_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: compress_api.php,v 1.11 2003-03-15 01:42:37 jfitzell Exp $
# $Id: compress_api.php,v 1.12 2003-03-15 22:09:55 jfitzell Exp $
# --------------------------------------------------------

###########################################################################
Expand All @@ -29,7 +29,9 @@ function compress_is_enabled() {
return ( $g_compression_started &&
ON == config_get( 'compress_html' ) &&
OFF == config_get( 'use_iis' ) &&
extension_loaded( 'zlib' ) );
'ob_gzhandler' != ini_get('output_handler') &&
extension_loaded( 'zlib' ) &&
! ini_get('zlib.output_compression') );
}

# ----------------
Expand Down

0 comments on commit e4dc191

Please sign in to comment.