This commit is contained in:
M@d D3n 2018-05-25 10:16:40 +03:00
parent c76d749554
commit 74e0986e54

View File

@ -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);