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')) { ...@@ -33,8 +33,10 @@ if (!$unzip = $SESSION->get('unzip')) {
redirect('/artefact/file/'); redirect('/artefact/file/');
} }
// Turn off gzip if it's on, because it prevents output from being flushed if (function_exists('apache_setenv')) {
apache_setenv('no-gzip', 1); // 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)); $stylesheets = array_reverse($THEME->get_url('style/style.css', true));
?> ?>
......
...@@ -37,8 +37,10 @@ if ($exportfile = $SESSION->get('exportfile')) { ...@@ -37,8 +37,10 @@ if ($exportfile = $SESSION->get('exportfile')) {
exit; exit;
} }
// Turn off gzip if it's on, because it prevents output from being flushed if (function_exists('apache_setenv')) {
apache_setenv('no-gzip', 1); // Turn off gzip if it's on, because it prevents output from being flushed
apache_setenv('no-gzip', 1);
}
if (!$exportdata = $SESSION->get('exportdata')) { if (!$exportdata = $SESSION->get('exportdata')) {
redirect('/export/'); redirect('/export/');
......
Supports Markdown
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