mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-27 17:00:52 +01:00
unlink a .gz version of a file if it exists
This commit is contained in:
parent
7fd8c75450
commit
deefe8299b
@ -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…
Reference in New Issue
Block a user