aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--action.php8
-rw-r--r--picture.php3
2 files changed, 7 insertions, 4 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');
diff --git a/picture.php b/picture.php
index db58c12e7..37d65a1f9 100644
--- a/picture.php
+++ b/picture.php
@@ -532,7 +532,8 @@ while ($row = pwg_db_fetch_assoc($result))
}
else
{ // not a pic - need download link
- $row['download_url'] = $row['element_url'] = get_element_url($row);;
+ $row['element_url'] = get_element_url($row);
+ $row['download_url'] = get_action_url($row['id'], 'e', true);
}
}