mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
Merge #1631 ob_gzhandler 대신 zlib.output_compression 사용 by kijin
* pr/1631: Use zlib.output_compression instead of ob_gzhandler
This commit is contained in:
commit
29fb8344f8
1 changed files with 5 additions and 8 deletions
|
|
@ -28,7 +28,6 @@ class DisplayHandler extends Handler
|
||||||
if(
|
if(
|
||||||
(defined('__OB_GZHANDLER_ENABLE__') && __OB_GZHANDLER_ENABLE__ == 1) &&
|
(defined('__OB_GZHANDLER_ENABLE__') && __OB_GZHANDLER_ENABLE__ == 1) &&
|
||||||
strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE &&
|
strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE &&
|
||||||
function_exists('ob_gzhandler') &&
|
|
||||||
extension_loaded('zlib') &&
|
extension_loaded('zlib') &&
|
||||||
$oModule->gzhandler_enable
|
$oModule->gzhandler_enable
|
||||||
)
|
)
|
||||||
|
|
@ -115,17 +114,15 @@ class DisplayHandler extends Handler
|
||||||
$this->gz_enabled = FALSE;
|
$this->gz_enabled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// results directly output
|
// enable gzip using zlib extension
|
||||||
if($this->gz_enabled)
|
if($this->gz_enabled)
|
||||||
{
|
{
|
||||||
header("Content-Encoding: gzip");
|
ini_set('zlib.output_compression', true);
|
||||||
print ob_gzhandler($output, 5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// results directly output
|
||||||
|
print $output;
|
||||||
|
|
||||||
// call a trigger after display
|
// call a trigger after display
|
||||||
ModuleHandler::triggerCall('display', 'after', $output);
|
ModuleHandler::triggerCall('display', 'after', $output);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue