issue #1917 provide download_url to pwg.images.getInfo

This commit is contained in:
plegall 2023-07-17 18:05:29 +02:00
parent cabb080d91
commit 145b686a0d

View file

@ -139,17 +139,27 @@ function ws_std_get_urls($image_row)
$src_image = new SrcImage($image_row);
$provide_download_url = false;
if ( $src_image->is_original() )
{// we have a photo
global $user;
if ($user['enabled_high'])
{
$ret['element_url'] = $src_image->get_url();
$provide_download_url = true;
}
}
else
{
$ret['element_url'] = get_element_url($image_row);
$provide_download_url = true;
}
$ret['download_url'] = null;
if ($provide_download_url)
{
$ret['download_url'] = str_replace('&', '&', get_action_url($image_row['id'], 'e', true));
}
$derivatives = DerivativeImage::get_all($src_image);