diff options
Diffstat (limited to 'mod/groups')
-rw-r--r-- | mod/groups/lib/groups.php | 12 | ||||
-rw-r--r-- | mod/groups/start.php | 4 | ||||
-rw-r--r-- | mod/groups/views/default/groups/invitationrequests.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/membershiprequests.php | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 86e6f018e..4e2b045a6 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -431,11 +431,13 @@ function groups_register_profile_buttons($group) { // group members if ($group->isMember($user)) { - // leave - $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; - $url = elgg_add_action_tokens_to_url($url); - $actions[$url] = 'groups:leave'; - } else { + if ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) { + // leave + $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); + $actions[$url] = 'groups:leave'; + } + } elseif (elgg_is_logged_in()) { // join - admins can always join. $url = elgg_get_site_url() . "action/groups/join?group_guid={$group->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); diff --git a/mod/groups/start.php b/mod/groups/start.php index 9e4694457..0425bdea6 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -435,7 +435,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "<span class=\"elgg-icon elgg-icon-delete\"></span>", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); @@ -447,7 +447,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'name' => 'edit', 'href' => "#edit-annotation-$annotation->id", 'text' => elgg_echo('edit'), - 'text_encode' => false, + 'encode_text' => false, 'rel' => 'toggle', ); $return[] = ElggMenuItem::factory($options); diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index 788788324..9c2df8b9c 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -10,7 +10,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { echo '<ul class="elgg-list">'; foreach ($vars['invitations'] as $group) { if ($group instanceof ElggGroup) { - $icon = elgg_view_entity_icon($group, 'tiny', array('override' => 'true')); + $icon = elgg_view_entity_icon($group, 'tiny', array('hover' => 'true')); $group_title = elgg_view('output/url', array( 'href' => $group->getURL(), diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php index 4d1c78c8c..7f33b83e0 100644 --- a/mod/groups/views/default/groups/membershiprequests.php +++ b/mod/groups/views/default/groups/membershiprequests.php @@ -11,7 +11,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) { echo '<ul class="elgg-list">'; foreach ($vars['requests'] as $user) { if ($user instanceof ElggUser) { - $icon = elgg_view_entity_icon($user, 'tiny', array('override' => 'true')); + $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true')); $user_title = elgg_view('output/url', array( 'href' => $user->getURL(), |