diff options
| author | czaks <marcin@6irc.net> | 2015-04-01 16:56:17 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-04-01 16:56:17 +0200 |
| commit | deefe8299b10cef01db1ef782f09e6cf44e6a773 (patch) | |
| tree | e0f3c50f89309295794d4d3024beb93b702f2d6a /inc | |
| parent | 7fd8c75450200c18c5cf42a839183a55a924cb1e (diff) | |
unlink a .gz version of a file if it exists
Diffstat (limited to 'inc')
| -rwxr-xr-x | inc/functions.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php index 7df75ef2..bdc03535 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -636,6 +636,13 @@ function file_unlink($path) { } $ret = @unlink($path); + + if ($config['gzip_static']) { + $gzpath = "$path.gz"; + + @unlink($gzpath); + } + if (isset($config['purge']) && $path[0] != '/' && isset($_SERVER['HTTP_HOST'])) { // Purge cache if (basename($path) == $config['file_index']) { |
