mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Use zlib.output_compression instead of ob_gzhandler
This commit is contained in:
parent
4492da9bbd
commit
e69a1af662
1 changed files with 5 additions and 8 deletions
|
|
@ -28,7 +28,6 @@ class DisplayHandler extends Handler
|
|||
if(
|
||||
(defined('__OB_GZHANDLER_ENABLE__') && __OB_GZHANDLER_ENABLE__ == 1) &&
|
||||
strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE &&
|
||||
function_exists('ob_gzhandler') &&
|
||||
extension_loaded('zlib') &&
|
||||
$oModule->gzhandler_enable
|
||||
)
|
||||
|
|
@ -112,17 +111,15 @@ class DisplayHandler extends Handler
|
|||
$this->gz_enabled = FALSE;
|
||||
}
|
||||
|
||||
// results directly output
|
||||
// enable gzip using zlib extension
|
||||
if($this->gz_enabled)
|
||||
{
|
||||
header("Content-Encoding: gzip");
|
||||
print ob_gzhandler($output, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $output;
|
||||
ini_set('zlib.output_compression', true);
|
||||
}
|
||||
|
||||
// results directly output
|
||||
print $output;
|
||||
|
||||
// call a trigger after display
|
||||
ModuleHandler::triggerCall('display', 'after', $output);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue