diff options
author | plegall <plg@piwigo.org> | 2016-05-13 11:05:15 +0200 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2016-05-13 11:05:15 +0200 |
commit | bd0d2ae6459c63ed7f7060589297bf63ae1cc619 (patch) | |
tree | 66fa333d54fa39d7ea2e559cb607f0b594805934 /action.php | |
parent | 2543002c8bb751517947010814aa8128e2f368aa (diff) | |
parent | bf81ba031575b8cd1ccc318f5d5a8f8ec7cb5049 (diff) |
Merge branch '2.8'
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'); |