aboutsummaryrefslogtreecommitdiff
path: root/index.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 /index.php
parentbdf0d61336b878f2e26fc42f98327834423fb409 (diff)
downloadelgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.gz
elgg-91b909acb2708e256f4a653dc0b11cd796d00a62.tar.bz2
not displaying edit menus for those without group membership
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/index.php b/index.php
index fb3e94dd4..0ba8a6c51 100644
--- a/index.php
+++ b/index.php
@@ -10,13 +10,6 @@
//get the owner of the current page
$owner = page_owner_entity();
- //$album
-
- if ($owner instanceof ElggGroup) {
-
- }
-
- error_log($owner->guid);
//if page owner cannot be found, forward to user's pictures instead (or world if not logged in)
if (is_null($owner->username) || empty($owner->username)) {
@@ -31,9 +24,11 @@
if ($owner instanceof ElggGroup) {
add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
$CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
+ if (can_write_to_container(0, $owner->guid)) {
add_submenu_item( elgg_echo('album:create'),
$CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
'tidypics');
+ }
}
//set the title