forked from GithubBackups/vichan
Merge pull request #745 from Zankaria/fix-deprecations
Fix more deprecations
This commit is contained in:
commit
feb2860d9e
@ -71,7 +71,7 @@ function createBoardlist($mod=false) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($message, $priority = true, $debug_stuff = false) {
|
function error($message, $priority = true, $debug_stuff = []) {
|
||||||
global $board, $mod, $config, $db_error;
|
global $board, $mod, $config, $db_error;
|
||||||
|
|
||||||
if ($config['syslog'] && $priority !== false) {
|
if ($config['syslog'] && $priority !== false) {
|
||||||
|
@ -715,13 +715,19 @@ function file_unlink($path) {
|
|||||||
$debug['unlink'][] = $path;
|
$debug['unlink'][] = $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_exists($path)) {
|
||||||
$ret = @unlink($path);
|
$ret = @unlink($path);
|
||||||
|
} else {
|
||||||
|
$ret = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ($config['gzip_static']) {
|
if ($config['gzip_static']) {
|
||||||
$gzpath = "$path.gz";
|
$gzpath = "$path.gz";
|
||||||
|
|
||||||
|
if (file_exists($gzpath)) {
|
||||||
@unlink($gzpath);
|
@unlink($gzpath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($config['purge']) && $path[0] != '/' && isset($_SERVER['HTTP_HOST'])) {
|
if (isset($config['purge']) && $path[0] != '/' && isset($_SERVER['HTTP_HOST'])) {
|
||||||
// Purge cache
|
// Purge cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user