diff --git a/README.md b/README.md index c2d57135..bc2d8072 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ vichan is a free light-weight, fast, highly configurable and user-friendly imageboard software package. It is written in PHP and has few dependencies. vichan is a fork of [Tinyboard](http://tinyboard.org/), a great imageboard package, actively -building on it and adding a lot of features and another improvements. +building on it and adding a lot of features and other improvements. Support and announcements: https://int.vichan.net/devel/ diff --git a/inc/functions.php b/inc/functions.php index db9c91b0..70f15c59 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']) {