From 7d73935323f8fd7bdbd2dfa118daf1e9df4fecca Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 3 Aug 2023 10:52:20 +0200 Subject: [PATCH] issue #1917 add parameter is_download to pwg.history.log --- include/ws_functions/pwg.php | 8 +++++++- ws.php | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/ws_functions/pwg.php b/include/ws_functions/pwg.php index 14de0e3c2..416b8c53f 100644 --- a/include/ws_functions/pwg.php +++ b/include/ws_functions/pwg.php @@ -622,7 +622,13 @@ function ws_history_log($params, &$service) increase_image_visit_counter($params['image_id']); } - pwg_log($params['image_id'], 'picture'); + $image_type = 'picture'; + if ($params['is_download']) + { + $image_type = 'high'; + } + + pwg_log($params['image_id'], $image_type); } /** diff --git a/ws.php b/ws.php index 39379db77..d019044a9 100644 --- a/ws.php +++ b/ws.php @@ -1315,6 +1315,7 @@ enabled_high, registration_date, registration_date_string, registration_date_sin 'cat_id' => array('type'=>WS_TYPE_ID, 'default'=>null), 'section' => array('default'=>null), 'tags_string' => array('default'=>null), + 'is_download' => array('default'=>false, 'type'=>WS_TYPE_BOOL), ), 'Log visit in history', $ws_functions_root . 'pwg.php'