From a8376b4033d8ff8880198cf37f4c0ba9d94d0316 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Wed, 20 May 2009 12:03:54 +0000 Subject: only owners and friends of owner can tag photos --- views/default/tidypics/image_menu.php | 8 +++++++- views/default/tidypics/tagging.php | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'views/default/tidypics') diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php index 269fcce8f..dcec9b35a 100644 --- a/views/default/tidypics/image_menu.php +++ b/views/default/tidypics/image_menu.php @@ -11,9 +11,15 @@ **************************************************************************/ $file_guid = $vars['file_guid']; + $viewer = $vars['viewer']; + $owner = $vars['owner']; + + // only owner and friends of owner can tag + if ($viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid)) { ?>
  • -
  • diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index a97285016..8ba58be4f 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -3,6 +3,8 @@ $links = $vars['links']; $photo_tags_json = $vars['photo_tags_json']; $file_guid = $vars['file_guid']; + $viewer = $vars['viewer']; + $owner = $vars['owner']; if ($photo_tags) { ?> @@ -26,7 +28,6 @@
    getGUID(), false, 'user', '', 0); -- cgit v1.2.3