aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics/image_menu.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-20 12:03:54 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-20 12:03:54 +0000
commita8376b4033d8ff8880198cf37f4c0ba9d94d0316 (patch)
treed7976519116180adf18e2445bc833b4aa9e87bb3 /views/default/tidypics/image_menu.php
parent12a27fa3b501cf08091cd063dd3208a17e0f624a (diff)
downloadelgg-a8376b4033d8ff8880198cf37f4c0ba9d94d0316.tar.gz
elgg-a8376b4033d8ff8880198cf37f4c0ba9d94d0316.tar.bz2
only owners and friends of owner can tag photos
Diffstat (limited to 'views/default/tidypics/image_menu.php')
-rw-r--r--views/default/tidypics/image_menu.php8
1 files changed, 7 insertions, 1 deletions
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)) {
?>
<li id="start_tagging"><a id="tag_control" href="javascript:void(0)" onclick="startTagging()"><?= elgg_echo('tidypics:tagthisphoto') ?></a></li>
-<?php
+<?php
+ }
if (get_plugin_setting('download_link', 'tidypics') != "no") {
?>
<li id="download_image"><a href="<?php echo $vars['url']; ?>action/tidypics/download?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("image:download"); ?></a></li>