Skip to content
Permalink
Browse files

fixes #998 temporary fix for Piwigo Remote Sync compatibility

  • Loading branch information...
plegall committed Apr 2, 2019
1 parent 940d1d2 commit 1646f5e631704239442ffa8ffba71a793573c55b
Showing with 7 additions and 1 deletion.
  1. +7 −1 include/ws_functions/pwg.php
@@ -327,7 +327,13 @@ function ws_session_getStatus($params, &$service)
list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
$res['current_datetime'] = $dbnow;
$res['version'] = PHPWG_VERSION;
$res['available_sizes'] = array_keys(ImageStdParams::get_defined_type_map());
// 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)
{
$res['available_sizes'] = array_keys(ImageStdParams::get_defined_type_map());
}
if (is_admin())
{

0 comments on commit 1646f5e

Please sign in to comment.
You can’t perform that action at this time.