Commit d4df1f4a authored by Nigel McNie's avatar Nigel McNie
Browse files

Wrap apache_setenv calls in function_exists for people not using PHP as an apache module.


Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent c75a5c43
......@@ -33,8 +33,10 @@ if (!$unzip = $SESSION->get('unzip')) {
redirect('/artefact/file/');
}
// Turn off gzip if it's on, because it prevents output from being flushed
apache_setenv('no-gzip', 1);
if (function_exists('apache_setenv')) {
// Turn off gzip if it's on, because it prevents output from being flushed
apache_setenv('no-gzip', 1);
}
$stylesheets = array_reverse($THEME->get_url('style/style.css', true));
?>
......
......@@ -37,8 +37,10 @@ if ($exportfile = $SESSION->get('exportfile')) {
exit;
}
// Turn off gzip if it's on, because it prevents output from being flushed
apache_setenv('no-gzip', 1);
if (function_exists('apache_setenv')) {
// Turn off gzip if it's on, because it prevents output from being flushed
apache_setenv('no-gzip', 1);
}
if (!$exportdata = $SESSION->get('exportdata')) {
redirect('/export/');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment