diff options
author | plegall <plg@piwigo.org> | 2016-05-10 11:37:35 +0200 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2016-05-10 11:37:35 +0200 |
commit | a684afbdc33fc904734ee63152e3040dbdbaa1bd (patch) | |
tree | 9a907994815f59a53b72beb92ca3b749b3feca80 /action.php | |
parent | f0d29d9134193be7fe708b6a2f54f80eeb9e77bf (diff) |
fixes #415, even if non-picture file, force download with action.php
Diffstat (limited to 'action.php')
-rw-r--r-- | action.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/action.php b/action.php index 33ae408ed..5a7ca423e 100644 --- a/action.php +++ b/action.php @@ -100,6 +100,8 @@ if ( empty($element_info) ) do_error(404, 'Requested id not found'); } +$src_image = new SrcImage($element_info); + // $filter['visible_categories'] and $filter['visible_images'] // are not used because it's not necessary (filter <> restriction) $query=' @@ -126,9 +128,9 @@ $file=''; switch ($_GET['part']) { case 'e': - if ( !$user['enabled_high'] ) - { - $deriv = new DerivativeImage(IMG_XXLARGE, new SrcImage($element_info)); + if ( $src_image->is_original() and !$user['enabled_high'] ) + {// we have a photo and the user has no access to HD + $deriv = new DerivativeImage(IMG_XXLARGE, $src_image); if ( !$deriv->same_as_source() ) { do_error(401, 'Access denied e'); |