aboutsummaryrefslogtreecommitdiff
path: root/viewimage.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-03-28 14:46:35 +0000
committerCash Costello <cash.costello@gmail.com>2009-03-28 14:46:35 +0000
commit91b909acb2708e256f4a653dc0b11cd796d00a62 (patch)
treee778bfc6199f9f00df633d31ea45dfecbe705f84 /viewimage.php
parentbdf0d61336b878f2e26fc42f98327834423fb409 (diff)
downloadelgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.gz
elgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.bz2
not displaying edit menus for those without group membership
Diffstat (limited to 'viewimage.php')
-rw-r--r--viewimage.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/viewimage.php b/viewimage.php
index a303fbe3c..fa05bda00 100644
--- a/viewimage.php
+++ b/viewimage.php
@@ -31,13 +31,15 @@
$CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
}
- add_submenu_item( elgg_echo('image:edit'),
- $CONFIG->wwwroot . 'pg/photos/edit/' . $photo_guid,
- 'photos');
- add_submenu_item( elgg_echo('image:delete'),
- $CONFIG->wwwroot . 'pg/photos/delete/' . $photo_guid,
- 'photos',
- true);
+ if (can_write_to_container(0, $album->container_guid)) {
+ add_submenu_item( elgg_echo('image:edit'),
+ $CONFIG->wwwroot . 'pg/photos/edit/' . $photo_guid,
+ 'photos');
+ add_submenu_item( elgg_echo('image:delete'),
+ $CONFIG->wwwroot . 'pg/photos/delete/' . $photo_guid,
+ 'photos',
+ true);
+ }
$title = $photo->title;
$area2 = elgg_view_title($title);