diff --git a/admin/history.php b/admin/history.php
index a09eede93..ed0969930 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -101,10 +101,11 @@ else
}
$form_param['ip'] = isset($_GET['filter_ip']) ? $_GET['filter_ip'] : @$form['ip'];
+$form_param['image_id'] = isset($_GET['filter_image_id']) ? $_GET['filter_image_id'] : @$form['image_id'];
$template->assign(
array(
- 'IMAGE_ID' => @$form['image_id'],
+ 'IMAGE_ID' => $form_param['image_id'],
'FILENAME' => @$form['filename'],
'IP' => $form_param['ip'],
'START' => @$form['start'],
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index b56f0942a..2252a246c 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -241,6 +241,7 @@ $template->assign(
'U_DOWNLOAD' => 'action.php?id='.$_GET['image_id'].'&part=e&pwg_token='.get_pwg_token().'&download',
'U_SYNC' => $admin_url_start.'&sync_metadata=1',
'U_DELETE' => $admin_url_start.'&delete=1&pwg_token='.get_pwg_token(),
+ 'U_HISTORY' => get_root_url().'admin.php?page=history&filter_image_id='.$_GET['image_id'],
'PATH'=>$row['path'],
diff --git a/admin/themes/default/js/history.js b/admin/themes/default/js/history.js
index 9d40e4474..c27494a1a 100644
--- a/admin/themes/default/js/history.js
+++ b/admin/themes/default/js/history.js
@@ -6,6 +6,9 @@ $(document).ready(() => {
if (current_param.ip != "") {
addIpFilter(current_param.ip);
}
+ if (current_param.image_id != "") {
+ addImageFilter(current_param.image_id);
+ }
$(".elem-type-select").on("change", function (e) {
console.log($(".elem-type-select option:selected").attr("value"));
diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl
index 4c7732a8e..70a7bc182 100644
--- a/admin/themes/default/template/history.tpl
+++ b/admin/themes/default/template/history.tpl
@@ -25,7 +25,7 @@ var current_param = {
3: "other"
},
user_id: "-1",
- image_id: "",
+ image_id: {if isset($IMAGE_ID)}"{$IMAGE_ID}"{else}""{/if},
filename: "",
ip:{if isset($IP)}"{$IP}"{else}""{/if},
display_thumbnail: "display_thumbnail_classic",
diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl
index 9df5d55d5..d4b3d3122 100644
--- a/admin/themes/default/template/picture_modify.tpl
+++ b/admin/themes/default/template/picture_modify.tpl
@@ -108,6 +108,7 @@ $('#action-delete-picture').on('click', function() {
{/if}
+
{if !url_is_remote($PATH)}