mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
related to #1703 Added the list of params for history search API method.
This commit is contained in:
@@ -114,8 +114,8 @@ function fillSummaryResult(summary) {
|
||||
|
||||
if ((summary.GUESTS.split(" ")[0] != "0")) {
|
||||
$(".summary-guests .summary-data").addClass("icon-plus-circled").on("click", function () {
|
||||
if (current_param.user == "-1") {
|
||||
current_param.user = guest_id;
|
||||
if (current_param.user_id == "-1") {
|
||||
current_param.user_id = guest_id;
|
||||
addGuestFilter(str_guest);
|
||||
fillHistoryResult(current_param);
|
||||
}
|
||||
@@ -155,8 +155,8 @@ function fillSummaryResult(summary) {
|
||||
new_user_item.data("user-id", id_of[key]);
|
||||
|
||||
new_user_item.on("click", function () {
|
||||
if (current_param.user != id_of[key]) {
|
||||
current_param.user = $(this).data("user-id");
|
||||
if (current_param.user_id != id_of[key]) {
|
||||
current_param.user_id = $(this).data("user-id");
|
||||
addUserFilter(key)
|
||||
fillHistoryResult(current_param);
|
||||
}
|
||||
@@ -272,9 +272,9 @@ function lineConstructor(line, id, imageDisplay) {
|
||||
newLine.find(".user-name").html(line.USERNAME + '<i class="add-filter icon-plus-circled"></i>');
|
||||
|
||||
newLine.find(".user-name").attr("id", line.USERID);
|
||||
if (current_param.user == "-1") {
|
||||
if (current_param.user_id == "-1") {
|
||||
newLine.find(".user-name").on("click", function () {
|
||||
current_param.user = $(this).attr('id') + "";
|
||||
current_param.user_id = $(this).attr('id') + "";
|
||||
current_param.pageNumber = 0;
|
||||
addUserFilter($(this).html());
|
||||
fillHistoryResult(current_param);
|
||||
@@ -422,7 +422,7 @@ function addUserFilter(username) {
|
||||
newFilter.find(".remove-filter").on("click", function () {
|
||||
$(this).parent().remove();
|
||||
|
||||
current_param.user = "-1";
|
||||
current_param.user_id = "-1";
|
||||
current_param.pageNumber = 0;
|
||||
fillHistoryResult(current_param);
|
||||
checkFilters();
|
||||
@@ -444,7 +444,7 @@ function addGuestFilter(username) {
|
||||
newFilter.find(".remove-filter").on("click", function () {
|
||||
$(this).parent().remove();
|
||||
|
||||
current_param.user = "-1";
|
||||
current_param.user_id = "-1";
|
||||
current_param.pageNumber = 0;
|
||||
fillHistoryResult(current_param);
|
||||
checkFilters();
|
||||
|
||||
@@ -24,7 +24,7 @@ var current_param = {
|
||||
2: "high",
|
||||
3: "other"
|
||||
},
|
||||
user: "-1",
|
||||
user_id: "-1",
|
||||
image_id: "",
|
||||
filename: "",
|
||||
ip: "",
|
||||
|
||||
@@ -674,7 +674,7 @@ function ws_history_search($param, &$service)
|
||||
}
|
||||
|
||||
// user
|
||||
$search['fields']['user'] = intval($param['user']);
|
||||
$search['fields']['user'] = intval($param['user_id']);
|
||||
|
||||
// image
|
||||
if (!empty($param['image_id']))
|
||||
|
||||
43
ws.php
43
ws.php
@@ -1309,8 +1309,47 @@ enabled_high, registration_date, registration_date_string, registration_date_sin
|
||||
$service->addMethod(
|
||||
'pwg.history.search',
|
||||
'ws_history_search',
|
||||
null,
|
||||
'Gives an history of who has visited the galery and the actions done in it. Receives parameter.',
|
||||
array(
|
||||
'start' => array(
|
||||
'default' => null
|
||||
),
|
||||
'end' => array(
|
||||
'default' => null
|
||||
),
|
||||
'types' => array(
|
||||
'flags'=>WS_PARAM_FORCE_ARRAY,
|
||||
'default' => array(
|
||||
'none',
|
||||
'picture',
|
||||
'high',
|
||||
'other',
|
||||
)
|
||||
),
|
||||
'user_id' => array(
|
||||
'default' => -1,
|
||||
),
|
||||
'image_id' => array(
|
||||
'default' => null,
|
||||
'type' => WS_TYPE_ID,
|
||||
),
|
||||
'filename' => array(
|
||||
'default' => null
|
||||
),
|
||||
'ip' => array(
|
||||
'default' => null
|
||||
),
|
||||
'display_thumbnail' => array(
|
||||
'default' => 'display_thumbnail_classic'
|
||||
),
|
||||
'pageNumber' => array(
|
||||
'default' => null,
|
||||
'type' => WS_TYPE_INT|WS_TYPE_POSITIVE,
|
||||
),
|
||||
),
|
||||
'Gives an history of who has visited the galery and the actions done in it. Receives parameter.
|
||||
<br> <strong>Types </strong> can be : \'none\', \'picture\', \'high\', \'other\'
|
||||
<br> <strong>Date format</strong> is yyyy-mm-dd
|
||||
<br> <strong>display_thumbnail</strong> can be : \'no_display_thumbnail\', \'display_thumbnail_classic\', \'display_thumbnail_hoverbox\'',
|
||||
$ws_functions_root . 'pwg.php'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user