fix tag/source reverts

This commit is contained in:
Shish 2020-01-30 22:33:43 +00:00
parent af733b53ca
commit 73310fa7d5
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ class SourceHistory extends Extension
// this is a request to revert to a previous version of the source
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
if (isset($_POST['revert'])) {
$this->process_revert_request($_POST['revert']);
$this->process_revert_request((int)$_POST['revert']);
}
}
} elseif ($event->page_matches("source_history/bulk_revert")) {

View file

@ -30,7 +30,7 @@ class TagHistory extends Extension
// this is a request to revert to a previous version of the tags
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
if (isset($_POST['revert'])) {
$this->process_revert_request($_POST['revert']);
$this->process_revert_request((int)$_POST['revert']);
}
}
} elseif ($event->page_matches("tag_history/bulk_revert")) {
@ -151,7 +151,7 @@ class TagHistory extends Extension
}
// lets get the values out of the result
$stored_image_id = int_escape($result['image_id']);
$stored_image_id = (int)$result['image_id'];
$stored_tags = $result['tags'];
$image = Image::by_id($stored_image_id);