mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-25 19:00:03 +03:00
issue #1917 provide download_url to pwg.images.getInfo
This commit is contained in:
parent
cabb080d91
commit
145b686a0d
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue