From 9ce3852126ed544301f0822d845cde7af9cecb15 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 23 Nov 2010 22:32:49 +0000 Subject: Fixes #2638 - specifying the full url on the urls so we don't have this problem anymore git-svn-id: http://code.elgg.org/elgg/trunk@7429 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/groups/groupprofile.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'mod/groups/views') diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index ef6388a59..44613c08d 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -9,7 +9,7 @@ $user = get_loggedin_user(); elgg_push_breadcrumb(elgg_echo('groups:all'), elgg_get_site_url()."pg/groups/world"); -// action url => label +// action or page url => label $actions = array(); if ($vars['entity']->canEdit()) { @@ -17,8 +17,10 @@ if ($vars['entity']->canEdit()) { elgg_push_breadcrumb(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/{$user->username}"); // edit and invite - $actions["mod/groups/edit.php?group_guid={$vars['entity']->getGUID()}"] = elgg_echo('groups:edit'); - $actions["mod/groups/invite.php?group_guid={$vars['entity']->getGUID()}"] = elgg_echo('groups:invite'); + $url = elgg_get_site_url() . "mod/groups/edit.php?group_guid={$vars['entity']->getGUID()}"; + $actions[$url] = elgg_echo('groups:edit'); + $url = elgg_get_site_url() . "mod/groups/invite.php?group_guid={$vars['entity']->getGUID()}"; + $actions[$url] = elgg_echo('groups:invite'); } if ($vars['entity']->isMember($user)) { @@ -26,24 +28,24 @@ if ($vars['entity']->isMember($user)) { elgg_push_breadcrumb(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/{$user->username}"); // leave - $url = elgg_add_action_tokens_to_url("action/groups/leave?group_guid={$vars['entity']->getGUID()}"); + $url = elgg_get_site_url() . "action/groups/leave?group_guid={$vars['entity']->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); $actions[$url] = elgg_echo('groups:leave'); } else { // join // admins can always join. if ($vars['entity']->isPublicMembership() || $vars['entity']->canEdit()) { - $url = elgg_add_action_tokens_to_url("action/groups/join?group_guid={$vars['entity']->getGUID()}"); + $url = elgg_get_site_url() . "action/groups/join?group_guid={$vars['entity']->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); $actions[$url] = elgg_echo('groups:join'); } else { // request membership - $url = elgg_add_action_tokens_to_url("action/groups/joinrequest?group_guid={$vars['entity']->getGUID()}"); + $url = elgg_get_site_url() . "action/groups/joinrequest?group_guid={$vars['entity']->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); $actions[$url] = elgg_echo('groups:joinrequest'); } } -/* - -*/ // build action buttons $action_buttons = ''; -- cgit v1.2.3