Changeset 800

Show
Ignore:
Timestamp:
01/14/07 06:36:05 (2 years ago)
Author:
sven
Message:

wrap apache_setenv() calls inside function_exists()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_files/download.php

    r723 r800  
    4646                // are thick. 
    4747                if (preg_match('#^(application.*zip|image/(png|jpeg|gif))$#', $mimetype)) { 
    48                     @apache_setenv('no-gzip', '1'); 
     48                    if (function_exists('apache_setenv')) { // apparently @ isn't enough to make php ignore this failing 
     49                        @apache_setenv('no-gzip', '1'); 
     50                    } 
    4951                } 
    5052                spitfile_with_mtime_check($CFG->dataroot . $file->location, $mimetype, $file->handler); 
  • devel/_files/icon.php

    r740 r800  
    2424             
    2525            // images most likely don't want compressing, and this will kill the Vary header 
    26             @apache_setenv('no-gzip', '1'); 
     26            if (function_exists('apache_setenv')) { // apparently @ isn't enough to make php ignore this failing 
     27                @apache_setenv('no-gzip', '1'); 
     28            } 
    2729             
    2830            if ($file->access == 'PUBLIC') { 
  • devel/_icons/icon.php

    r690 r800  
    6262 
    6363// images most likely don't want compressing, and this will kill the Vary header 
    64 @apache_setenv('no-gzip', '1'); 
     64if (function_exists('apache_setenv')) { // apparently @ isn't enough to make php ignore this failing 
     65    @apache_setenv('no-gzip', '1'); 
     66
    6567 
    6668// user icons are public