diff --git a/admin/history.php b/admin/history.php index 69a2d6c46..a09eede93 100644 --- a/admin/history.php +++ b/admin/history.php @@ -100,11 +100,13 @@ else pwg_get_cookie_var('display_thumbnail', 'no_display_thumbnail'); } +$form_param['ip'] = isset($_GET['filter_ip']) ? $_GET['filter_ip'] : @$form['ip']; + $template->assign( array( 'IMAGE_ID' => @$form['image_id'], 'FILENAME' => @$form['filename'], - 'IP' => @$form['ip'], + 'IP' => $form_param['ip'], 'START' => @$form['start'], 'END' => @$form['end'], ) diff --git a/admin/themes/default/js/history.js b/admin/themes/default/js/history.js index d1d5ad3b9..9d40e4474 100644 --- a/admin/themes/default/js/history.js +++ b/admin/themes/default/js/history.js @@ -3,6 +3,10 @@ $(document).ready(() => { activateLineOptions(); checkFilters(); + if (current_param.ip != "") { + addIpFilter(current_param.ip); + } + $(".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 2b46ec47c..4c7732a8e 100644 --- a/admin/themes/default/template/history.tpl +++ b/admin/themes/default/template/history.tpl @@ -27,7 +27,7 @@ var current_param = { user_id: "-1", image_id: "", filename: "", - ip: "", + ip:{if isset($IP)}"{$IP}"{else}""{/if}, display_thumbnail: "display_thumbnail_classic", pageNumber: 0 {* fetch lines from line 0 to line 100*} }