fix tag/source reverts
This commit is contained in:
parent
af733b53ca
commit
73310fa7d5
2 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ class SourceHistory extends Extension
|
||||||
// this is a request to revert to a previous version of the source
|
// this is a request to revert to a previous version of the source
|
||||||
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
|
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
|
||||||
if (isset($_POST['revert'])) {
|
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")) {
|
} elseif ($event->page_matches("source_history/bulk_revert")) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ class TagHistory extends Extension
|
||||||
// this is a request to revert to a previous version of the tags
|
// this is a request to revert to a previous version of the tags
|
||||||
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
|
if ($user->can(Permissions::EDIT_IMAGE_TAG)) {
|
||||||
if (isset($_POST['revert'])) {
|
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")) {
|
} elseif ($event->page_matches("tag_history/bulk_revert")) {
|
||||||
|
@ -151,7 +151,7 @@ class TagHistory extends Extension
|
||||||
}
|
}
|
||||||
|
|
||||||
// lets get the values out of the result
|
// 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'];
|
$stored_tags = $result['tags'];
|
||||||
|
|
||||||
$image = Image::by_id($stored_image_id);
|
$image = Image::by_id($stored_image_id);
|
||||||
|
|
Reference in a new issue