From 97069ea490b52181da8a434ff1a3e8603ac04adf Mon Sep 17 00:00:00 2001 From: Chen-Pang He Date: Mon, 30 Jun 2014 15:50:20 +0800 Subject: [PATCH] Introduce $config['gzip_static'] --- inc/functions.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index efc0594b..6854d8b7 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1,7 +1,7 @@ = 1024) + if (file_put_contents($gzpath, gzencode($data), $simple ? 0 : LOCK_EX) === false) + error("Unable to write to file: $gzpath"); + if (!touch($gzpath, filemtime($path), fileatime($path))) + error("Unable to touch file: $gzpath"); + } + else { + @unlink($gzpath); + } + } + if (!$skip_purge && isset($config['purge'])) { // Purge cache if (basename($path) == $config['file_index']) {