From 73310fa7d539ff3e08948bb7b94ecbc2102a1ddc Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 30 Jan 2020 22:33:43 +0000 Subject: [PATCH] fix tag/source reverts --- ext/source_history/main.php | 2 +- ext/tag_history/main.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/source_history/main.php b/ext/source_history/main.php index dfcec726..602bd14f 100644 --- a/ext/source_history/main.php +++ b/ext/source_history/main.php @@ -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")) { diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php index f1163eee..fd7c93ea 100644 --- a/ext/tag_history/main.php +++ b/ext/tag_history/main.php @@ -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);