mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 16:53:34 +02:00
fixed #1782 added sneaky way to filter by IP in the url
This commit is contained in:
+3
-1
@@ -100,11 +100,13 @@ else
|
|||||||
pwg_get_cookie_var('display_thumbnail', 'no_display_thumbnail');
|
pwg_get_cookie_var('display_thumbnail', 'no_display_thumbnail');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$form_param['ip'] = isset($_GET['filter_ip']) ? $_GET['filter_ip'] : @$form['ip'];
|
||||||
|
|
||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
'IMAGE_ID' => @$form['image_id'],
|
'IMAGE_ID' => @$form['image_id'],
|
||||||
'FILENAME' => @$form['filename'],
|
'FILENAME' => @$form['filename'],
|
||||||
'IP' => @$form['ip'],
|
'IP' => $form_param['ip'],
|
||||||
'START' => @$form['start'],
|
'START' => @$form['start'],
|
||||||
'END' => @$form['end'],
|
'END' => @$form['end'],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ $(document).ready(() => {
|
|||||||
activateLineOptions();
|
activateLineOptions();
|
||||||
checkFilters();
|
checkFilters();
|
||||||
|
|
||||||
|
if (current_param.ip != "") {
|
||||||
|
addIpFilter(current_param.ip);
|
||||||
|
}
|
||||||
|
|
||||||
$(".elem-type-select").on("change", function (e) {
|
$(".elem-type-select").on("change", function (e) {
|
||||||
console.log($(".elem-type-select option:selected").attr("value"));
|
console.log($(".elem-type-select option:selected").attr("value"));
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ var current_param = {
|
|||||||
user_id: "-1",
|
user_id: "-1",
|
||||||
image_id: "",
|
image_id: "",
|
||||||
filename: "",
|
filename: "",
|
||||||
ip: "",
|
ip:{if isset($IP)}"{$IP}"{else}""{/if},
|
||||||
display_thumbnail: "display_thumbnail_classic",
|
display_thumbnail: "display_thumbnail_classic",
|
||||||
pageNumber: 0 {* fetch lines from line 0 to line 100*}
|
pageNumber: 0 {* fetch lines from line 0 to line 100*}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user