From 08124d10f727ef26e330490d435785a8a3ea6f6f Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 31 Jan 2024 11:14:27 +0100 Subject: [PATCH] fixes #2100 do not send save_visits to PiwigoRemoteSync --- include/ws_functions/pwg.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ws_functions/pwg.php b/include/ws_functions/pwg.php index f4fdcda69..230396e5d 100644 --- a/include/ws_functions/pwg.php +++ b/include/ws_functions/pwg.php @@ -391,6 +391,12 @@ function ws_session_getStatus($params, &$service) $res['version'] = PHPWG_VERSION; $res['save_visits'] = do_log(); + // Piwigo Remote Sync does not support receiving the new (version 14) output "save_visits" + if (isset($_SERVER['HTTP_USER_AGENT']) and preg_match('/^PiwigoRemoteSync/', $_SERVER['HTTP_USER_AGENT'])) + { + unset($res['save_visits']); + } + // Piwigo Remote Sync does not support receiving the available sizes $piwigo_remote_sync_agent = 'Apache-HttpClient/'; if (!isset($_SERVER['HTTP_USER_AGENT']) or substr($_SERVER['HTTP_USER_AGENT'], 0, strlen($piwigo_remote_sync_agent)) !== $piwigo_remote_sync_agent)