|
|
@ -1054,7 +1054,6 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function compress_htlm($data) |
|
|
|
function compress_htlm($data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$search = array( |
|
|
|
$search = array( |
|
|
|
'/\>[^\S ]+/s', // strip whitespaces after tags, except space |
|
|
|
'/\>[^\S ]+/s', // strip whitespaces after tags, except space |
|
|
|
'/[^\S ]+\</s', // strip whitespaces before tags, except space |
|
|
|
'/[^\S ]+\</s', // strip whitespaces before tags, except space |
|
|
@ -1084,6 +1083,11 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB; |
|
|
|
global $AVE_DB; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$Gzip = strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (defined('HTML_COMPRESSION') && HTML_COMPRESSION) |
|
|
|
|
|
|
|
$data = compress_htlm($data); |
|
|
|
|
|
|
|
|
|
|
|
//-- Вывод статистики загрузки и запросов SQL (только для администраторов) |
|
|
|
//-- Вывод статистики загрузки и запросов SQL (только для администраторов) |
|
|
|
if (! defined('ONLYCONTENT') && UGROUP == 1) |
|
|
|
if (! defined('ONLYCONTENT') && UGROUP == 1) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1100,11 +1104,6 @@ |
|
|
|
$data .= Debug::displayInfo(); |
|
|
|
$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)) |
|
|
|
if ($Gzip && (defined('GZIP_COMPRESSION') && GZIP_COMPRESSION)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$data = gzencode($data, 9); |
|
|
|
$data = gzencode($data, 9); |
|
|
|