This commit is contained in:
Shish
2020-01-26 16:38:26 +00:00
parent 60dda96fd2
commit 3631084afd
25 changed files with 105 additions and 55 deletions

View File

@ -109,13 +109,13 @@ class Upload extends Extension
$min_free_space = $config->get_int("upload_min_free_space");
if ($min_free_space > 0) {
// SHIT: fucking PHP "security" measures -_-;;;
$img_path = realpath("./images/");
if($img_path) {
$free_num = @disk_free_space($img_path);
if ($free_num !== false) {
$this->is_full = $free_num < $min_free_space;
}
}
$img_path = realpath("./images/");
if ($img_path) {
$free_num = @disk_free_space($img_path);
if ($free_num !== false) {
$this->is_full = $free_num < $min_free_space;
}
}
}
}