From 80f552389267d97d667259b030bbcc1a2a29b7d3 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 18 Jul 2016 23:08:31 +0200 Subject: fixes #469, add download link on photo edit/admin page --- action.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'action.php') 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'); } -- cgit v1.2.3