diff options
author | plegall <plg@piwigo.org> | 2016-07-18 23:08:31 +0200 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2016-07-18 23:08:31 +0200 |
commit | 80f552389267d97d667259b030bbcc1a2a29b7d3 (patch) | |
tree | 17b378cf91be4ac1990b86e73d2e8573370dc007 /action.php | |
parent | e47568b087902cd98accfdbe1cf7b59007b950f9 (diff) |
fixes #469, add download link on photo edit/admin page
Diffstat (limited to 'action.php')
-rw-r--r-- | action.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/action.php b/action.php index 5a7ca423e..b87e16054 100644 --- a/action.php +++ b/action.php @@ -100,6 +100,14 @@ if ( empty($element_info) ) do_error(404, 'Requested id not found'); } +// special download action for admins +$is_admin_download = false; +if (is_admin() and isset($_GET['pwg_token']) and get_pwg_token() == $_GET['pwg_token']) +{ + $is_admin_download = true; + $user['enabled_high'] = true; +} + $src_image = new SrcImage($element_info); // $filter['visible_categories'] and $filter['visible_images'] @@ -118,7 +126,7 @@ SELECT id ).' LIMIT 1 ;'; -if ( pwg_db_num_rows(pwg_query($query))<1 ) +if (!$is_admin_download and pwg_db_num_rows(pwg_query($query))<1 ) { do_error(401, 'Access denied'); } |