aboutsummaryrefslogtreecommitdiff
path: root/viewalbum.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 /viewalbum.php
parentbdf0d61336b878f2e26fc42f98327834423fb409 (diff)
downloadelgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.gz
elgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.bz2
not displaying edit menus for those without group membership
Diffstat (limited to 'viewalbum.php')
-rw-r--r--viewalbum.php30
1 files changed, 17 insertions, 13 deletions
diff --git a/viewalbum.php b/viewalbum.php
index 2a89742a1..4bdd1a2c7 100644
--- a/viewalbum.php
+++ b/viewalbum.php
@@ -25,21 +25,25 @@
if ($owner instanceof ElggGroup) {
add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
$CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
- add_submenu_item( elgg_echo('album:create'),
- $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
- 'photos');
}
- add_submenu_item( elgg_echo('album:addpix'),
- $CONFIG->wwwroot . 'pg/photos/upload/' . $album_guid,
- 'photos');
- add_submenu_item( elgg_echo('album:edit'),
- $CONFIG->wwwroot . 'pg/photos/edit/' . $album_guid,
- 'photos');
- add_submenu_item( elgg_echo('album:delete'),
- $CONFIG->wwwroot . 'pg/photos/delete/' . $album_guid,
- 'photos',
- true);
+ if (can_write_to_container(0, $album->container_guid)) {
+ if ($owner instanceof ElggGroup) {
+ add_submenu_item( elgg_echo('album:create'),
+ $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
+ 'photos');
+ }
+ add_submenu_item( elgg_echo('album:addpix'),
+ $CONFIG->wwwroot . 'pg/photos/upload/' . $album_guid,
+ 'photos');
+ add_submenu_item( elgg_echo('album:edit'),
+ $CONFIG->wwwroot . 'pg/photos/edit/' . $album_guid,
+ 'photos');
+ add_submenu_item( elgg_echo('album:delete'),
+ $CONFIG->wwwroot . 'pg/photos/delete/' . $album_guid,
+ 'photos',
+ true);
+ }
// set title and body
$title = $album->title;