Browse Source

unlink a .gz version of a file if it exists

pull/40/head
czaks 8 years ago
parent
commit
deefe8299b
  1. 7
      inc/functions.php

7
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']) {

Loading…
Cancel
Save