From a684afbdc33fc904734ee63152e3040dbdbaa1bd Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 10 May 2016 11:37:35 +0200 Subject: fixes #415, even if non-picture file, force download with action.php --- action.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'action.php') 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'); -- cgit v1.2.3