This commit is contained in:
Shish
2019-11-04 00:42:06 +00:00
parent d17e207984
commit f79eafc91e
11 changed files with 32 additions and 46 deletions

View File

@ -187,13 +187,11 @@ class Upload extends Extension
throw new UploadException("Can not replace Image: disk nearly full");
}
// Try to get the image ID
if($event->count_args() >= 1) {
if ($event->count_args() >= 1) {
$image_id = int_escape($event->get_arg(0));
}
elseif(isset($_POST['image_id'])) {
} elseif (isset($_POST['image_id'])) {
$image_id = $_POST['image_id'];
}
else {
} else {
throw new UploadException("Can not replace Image: No valid Image ID given.");
}