mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-01-22 07:20:07 +00:00
Fix
This commit is contained in:
parent
c76d749554
commit
74e0986e54
@ -1054,7 +1054,6 @@
|
||||
*/
|
||||
function compress_htlm($data)
|
||||
{
|
||||
|
||||
$search = array(
|
||||
'/\>[^\S ]+/s', // strip whitespaces after tags, except space
|
||||
'/[^\S ]+\</s', // strip whitespaces before tags, except space
|
||||
@ -1084,6 +1083,11 @@
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
$Gzip = strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false;
|
||||
|
||||
if (defined('HTML_COMPRESSION') && HTML_COMPRESSION)
|
||||
$data = compress_htlm($data);
|
||||
|
||||
//-- Вывод статистики загрузки и запросов SQL (только для администраторов)
|
||||
if (! defined('ONLYCONTENT') && UGROUP == 1)
|
||||
{
|
||||
@ -1100,11 +1104,6 @@
|
||||
$data .= Debug::displayInfo();
|
||||
}
|
||||
|
||||
$Gzip = strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false;
|
||||
|
||||
if (defined('HTML_COMPRESSION') && HTML_COMPRESSION)
|
||||
$data = compress_htlm($data);
|
||||
|
||||
if ($Gzip && (defined('GZIP_COMPRESSION') && GZIP_COMPRESSION))
|
||||
{
|
||||
$data = gzencode($data, 9);
|
||||
|
Loading…
x
Reference in New Issue
Block a user