aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
commitadae1958a95d7e801de91d673e927cac348236d9 (patch)
treedeb60ecca44c95abc5301b0d64bcd08585e85798 /mod/groups
parentea14bfe87eda3af8e8002c64ad909cf592d7fe76 (diff)
downloadelgg-adae1958a95d7e801de91d673e927cac348236d9.tar.gz
elgg-adae1958a95d7e801de91d673e927cac348236d9.tar.bz2
Fixes #2228: Major cleanup of urls -- remove leading pg/ and trailing / from most urls in core and plugins
git-svn-id: http://code.elgg.org/elgg/trunk@8653 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/actions/discussion/delete.php2
-rw-r--r--mod/groups/actions/groups/delete.php2
-rw-r--r--mod/groups/actions/groups/membership/invite.php2
-rw-r--r--mod/groups/lib/discussion.php6
-rw-r--r--mod/groups/lib/groups.php2
-rw-r--r--mod/groups/start.php60
-rw-r--r--mod/groups/views/default/discussion/group_module.php4
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php2
-rw-r--r--mod/groups/views/default/groups/profile/activity_module.php2
-rw-r--r--mod/groups/views/default/groups/profile/buttons.php4
-rw-r--r--mod/groups/views/default/groups/side_menu.php4
-rw-r--r--mod/groups/views/default/groups/sidebar/find.php2
-rw-r--r--mod/groups/views/default/groups/sidebar/members.php4
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/content.php2
14 files changed, 49 insertions, 49 deletions
diff --git a/mod/groups/actions/discussion/delete.php b/mod/groups/actions/discussion/delete.php
index c3de612d7..f307aa091 100644
--- a/mod/groups/actions/discussion/delete.php
+++ b/mod/groups/actions/discussion/delete.php
@@ -26,4 +26,4 @@ if ($result) {
register_error(elgg_echo('discussion:error:notdeleted'));
}
-forward("pg/discussion/owner/$container->guid");
+forward("discussion/owner/$container->guid");
diff --git a/mod/groups/actions/groups/delete.php b/mod/groups/actions/groups/delete.php
index 9ed7954dc..932d03355 100644
--- a/mod/groups/actions/groups/delete.php
+++ b/mod/groups/actions/groups/delete.php
@@ -34,4 +34,4 @@ if (($entity) && ($entity instanceof ElggGroup)) {
}
$url_name = elgg_get_logged_in_user_entity()->username;
-forward(elgg_get_site_url() . "pg/groups/member/{$url_name}");
+forward(elgg_get_site_url() . "groups/member/{$url_name}");
diff --git a/mod/groups/actions/groups/membership/invite.php b/mod/groups/actions/groups/membership/invite.php
index b106e4869..db90ecf3a 100644
--- a/mod/groups/actions/groups/membership/invite.php
+++ b/mod/groups/actions/groups/membership/invite.php
@@ -26,7 +26,7 @@ if (sizeof($user_guid)) {
add_entity_relationship($group->guid, 'invited', $user->guid);
// Send email
- $url = elgg_normalize_url("pg/groups/invitations/$user->username");
+ $url = elgg_normalize_url("groups/invitations/$user->username");
$result = notify_user($user->getGUID(), $group->owner_guid,
elgg_echo('groups:invite:subject', array($user->name, $group->name)),
elgg_echo('groups:invite:body', array(
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index 2a3de783b..fb70d6c00 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -95,7 +95,7 @@ function discussion_handle_edit_page($type, $guid) {
$title = elgg_echo('groups:addtopic');
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($title);
$body_vars = discussion_prepare_form_vars();
@@ -114,7 +114,7 @@ function discussion_handle_edit_page($type, $guid) {
$title = elgg_echo('groups:edittopic');
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($topic->title, $topic->getURL());
elgg_push_breadcrumb($title);
@@ -159,7 +159,7 @@ function discussion_handle_view_page($guid) {
group_gatekeeper();
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($topic->title);
$content = elgg_view_entity($topic, true);
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index d3b8bd26a..dbbaf4366 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -189,7 +189,7 @@ function groups_handle_profile_page($guid) {
$group = get_entity($guid);
if (!$group) {
- forward('pg/groups/all');
+ forward('groups/all');
}
elgg_push_breadcrumb($group->name);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 9a80fd366..8c3246660 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -21,7 +21,7 @@ function groups_init() {
elgg_register_entity_type('group', '');
// Set up the menu
- $item = new ElggMenuItem('groups', elgg_echo('groups'), 'pg/groups/all');
+ $item = new ElggMenuItem('groups', elgg_echo('groups'), 'groups/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
@@ -137,16 +137,16 @@ function groups_submenus() {
if (elgg_get_context() == 'groups') {
if ($page_owner instanceof ElggGroup) {
if (elgg_is_logged_in() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) {
- $url = elgg_get_site_url() . "pg/groups/requests/{$page_owner->getGUID()}";
+ $url = elgg_get_site_url() . "groups/requests/{$page_owner->getGUID()}";
add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1');
}
} else {
- add_submenu_item(elgg_echo('groups:all'), "pg/groups/all", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:all'), "groups/all", 'groupslinks1');
if ($user = elgg_get_logged_in_user_entity()) {
- add_submenu_item(elgg_echo('groups:owned'), "pg/groups/owner/$user->username", 'groupslinks1');
- add_submenu_item(elgg_echo('groups:yours'), "pg/groups/member/$user->username", 'groupslinks1');
- add_submenu_item(elgg_echo('groups:invitations'), "pg/groups/invitations/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:owned'), "groups/owner/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:yours'), "groups/member/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:invitations'), "groups/invitations/$user->username", 'groupslinks1');
}
}
}
@@ -156,17 +156,17 @@ function groups_submenus() {
* Groups page handler
*
* URLs take the form of
- * All groups: pg/groups/all
- * User's owned groups: pg/groups/owner/<username>
- * User's member groups: pg/groups/member/<username>
- * Group profile: pg/groups/profile/<guid>/<title>
- * New group: pg/groups/add/<guid>
- * Edit group: pg/groups/edit/<guid>
- * Group invitations: pg/groups/invitations/<username>
- * Invite to group: pg/groups/invite/<guid>
- * Membership requests: pg/groups/requests/<guid>
- * Group activity: pg/groups/activity/<guid>
- * Group members: pg/groups/members/<guid>
+ * All groups: groups/all
+ * User's owned groups: groups/owner/<username>
+ * User's member groups: groups/member/<username>
+ * Group profile: groups/profile/<guid>/<title>
+ * New group: groups/add/<guid>
+ * Edit group: groups/edit/<guid>
+ * Group invitations: groups/invitations/<username>
+ * Invite to group: groups/invite/<guid>
+ * Membership requests: groups/requests/<guid>
+ * Group activity: groups/activity/<guid>
+ * Group members: groups/members/<guid>
*
* @param array $page Array of url segments for routing
*/
@@ -174,7 +174,7 @@ function groups_page_handler($page) {
elgg_load_library('elgg:groups');
- elgg_push_breadcrumb(elgg_echo('groups'), "pg/groups/all");
+ elgg_push_breadcrumb(elgg_echo('groups'), "groups/all");
switch ($page[0]) {
case 'all':
@@ -243,7 +243,7 @@ function groups_icon_handler($page) {
function groups_url($entity) {
$title = elgg_get_friendly_title($entity->name);
- return "pg/groups/profile/{$entity->guid}/$title";
+ return "groups/profile/{$entity->guid}/$title";
}
/**
@@ -258,7 +258,7 @@ function groups_icon_url_override($hook, $type, $returnvalue, $params) {
if (isset($group->icontime)) {
// return thumbnail
$icontime = $group->icontime;
- return "pg/groupicon/$group->guid/$size/$icontime.jpg";
+ return "groupicon/$group->guid/$size/$icontime.jpg";
}
return "mod/groups/graphics/default{$size}.gif";
@@ -270,7 +270,7 @@ function groups_icon_url_override($hook, $type, $returnvalue, $params) {
function groups_activity_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'group')) {
if ($params['entity']->activity_enable != "no") {
- $url = "pg/groups/activity/{$params['entity']->guid}";
+ $url = "groups/activity/{$params['entity']->guid}";
$item = new ElggMenuItem('activity', elgg_echo('groups:activity'), $url);
$return[] = $item;
}
@@ -553,7 +553,7 @@ function activity_profile_menu($hook, $entity_type, $return_value, $params) {
if ($params['owner'] instanceof ElggGroup) {
$return_value[] = array(
'text' => elgg_echo('Activity'),
- 'href' => "pg/groups/activity/{$params['owner']->getGUID()}"
+ 'href' => "groups/activity/{$params['owner']->getGUID()}"
);
}
return $return_value;
@@ -629,11 +629,11 @@ function discussion_init() {
* Discussion page handler
*
* URLs take the form of
- * All topics in site: pg/discussion/all
- * List topics in forum: pg/discussion/owner/<guid>
- * View discussion topic: pg/discussion/view/<guid>
- * Add discussion topic: pg/discussion/add/<guid>
- * Edit discussion topic: pg/discussion/edit/<guid>
+ * All topics in site: discussion/all
+ * List topics in forum: discussion/owner/<guid>
+ * View discussion topic: discussion/view/<guid>
+ * Add discussion topic: discussion/add/<guid>
+ * Edit discussion topic: discussion/edit/<guid>
*
* @param array $page Array of url segments for routing
*/
@@ -641,7 +641,7 @@ function discussion_page_handler($page) {
elgg_load_library('elgg:discussion');
- elgg_push_breadcrumb(elgg_echo('discussion'), 'pg/discussion/all');
+ elgg_push_breadcrumb(elgg_echo('discussion'), 'discussion/all');
switch ($page[0]) {
case 'all':
@@ -669,7 +669,7 @@ function discussion_page_handler($page) {
* @return string
*/
function discussion_override_topic_url($entity) {
- return 'pg/discussion/view/' . $entity->guid;
+ return 'discussion/view/' . $entity->guid;
}
/**
@@ -687,7 +687,7 @@ function discussion_comment_override($hook, $type, $return, $params) {
function discussion_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'group')) {
if ($params['entity']->forum_enable != "no") {
- $url = "pg/discussion/owner/{$params['entity']->guid}";
+ $url = "discussion/owner/{$params['entity']->guid}";
$item = new ElggMenuItem('discussion', elgg_echo('discussion:group'), $url);
$return[] = $item;
}
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php
index b606579cb..cbefe8e7c 100644
--- a/mod/groups/views/default/discussion/group_module.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -13,7 +13,7 @@ $group = $vars['entity'];
$all_link = elgg_view('output/url', array(
- 'href' => "pg/discussion/owner/$group->guid",
+ 'href' => "discussion/owner/$group->guid",
'text' => elgg_echo('link:view:all'),
));
@@ -38,7 +38,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/discussion/add/" . $group->getGUID(),
+ 'href' => "discussion/add/" . $group->getGUID(),
'text' => elgg_echo('groups:addtopic'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php
index 2ba0e5f0e..863515a85 100644
--- a/mod/groups/views/default/groups/group_sort_menu.php
+++ b/mod/groups/views/default/groups/group_sort_menu.php
@@ -9,7 +9,7 @@ $group_count = (int)elgg_get_entities(array('types' => 'group', 'count' => true)
$selected = elgg_extract('selected', $vars);
-$url = elgg_get_site_url() . "pg/groups/all/";
+$url = elgg_get_site_url() . "groups/all";
?>
<div class="elgg-tabs mtm">
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php
index 9955b598f..4ea97cad6 100644
--- a/mod/groups/views/default/groups/profile/activity_module.php
+++ b/mod/groups/views/default/groups/profile/activity_module.php
@@ -17,7 +17,7 @@ if (!$group) {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/groups/activity/$group->guid",
+ 'href' => "groups/activity/$group->guid",
'text' => elgg_echo('link:view:all'),
));
diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php
index 836dd2982..55e99f59c 100644
--- a/mod/groups/views/default/groups/profile/buttons.php
+++ b/mod/groups/views/default/groups/profile/buttons.php
@@ -17,9 +17,9 @@ $actions = array();
// group owners
if ($vars['entity']->canEdit()) {
// edit and invite
- $url = elgg_get_site_url() . "pg/groups/edit/{$vars['entity']->getGUID()}";
+ $url = elgg_get_site_url() . "groups/edit/{$vars['entity']->getGUID()}";
$actions[$url] = elgg_echo('groups:edit');
- $url = elgg_get_site_url() . "pg/groups/invite/{$vars['entity']->getGUID()}";
+ $url = elgg_get_site_url() . "groups/invite/{$vars['entity']->getGUID()}";
$actions[$url] = elgg_echo('groups:invite');
}
diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php
index df2314689..88a56830b 100644
--- a/mod/groups/views/default/groups/side_menu.php
+++ b/mod/groups/views/default/groups/side_menu.php
@@ -6,8 +6,8 @@
<ul class="submenu page_navigation">
<?php
if(elgg_is_logged_in()){
- echo "<li><a href=\"".elgg_get_site_url()."pg/groups/member/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:yours') ."</a></li>";
- echo "<li><a href=\"".elgg_get_site_url()."pg/groups/invitations/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:invitations') ."</a></li>";
+ echo "<li><a href=\"".elgg_get_site_url()."groups/member/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:yours') ."</a></li>";
+ echo "<li><a href=\"".elgg_get_site_url()."groups/invitations/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:invitations') ."</a></li>";
}
?>
</ul> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/sidebar/find.php b/mod/groups/views/default/groups/sidebar/find.php
index 0d31ee711..181f437e3 100644
--- a/mod/groups/views/default/groups/sidebar/find.php
+++ b/mod/groups/views/default/groups/sidebar/find.php
@@ -4,7 +4,7 @@
*
* @package ElggGroups
*/
-$url = elgg_get_site_url() . 'pg/groups/world';
+$url = elgg_get_site_url() . 'groups/world';
$body = elgg_view_form('groups/search', array('action' => $url, 'method' => 'get'));
echo elgg_view_module('aside', elgg_echo('groups:searchtag'), $body);
diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php
index 4fbb54456..c18366c1b 100644
--- a/mod/groups/views/default/groups/sidebar/members.php
+++ b/mod/groups/views/default/groups/sidebar/members.php
@@ -8,7 +8,7 @@
*/
$all_link = elgg_view('output/url', array(
- 'href' => 'pg/groups/members/' . $vars['entity']->guid,
+ 'href' => 'groups/members/' . $vars['entity']->guid,
'text' => elgg_echo('groups:members:more'),
));
@@ -20,4 +20,4 @@ foreach ($members as $mem) {
$body .= '</ul>';
$body .= "<div class='center mts'>$all_link</div>";
-echo elgg_view_module('aside', elgg_echo('groups:members'), $body); \ No newline at end of file
+echo elgg_view_module('aside', elgg_echo('groups:members'), $body);
diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php
index c15e4507e..81d355442 100644
--- a/mod/groups/views/default/widgets/a_users_groups/content.php
+++ b/mod/groups/views/default/widgets/a_users_groups/content.php
@@ -21,7 +21,7 @@ $content = elgg_list_entities_from_relationship($options);
echo $content;
if ($content) {
- $url = "pg/group/member/" . elgg_get_page_owner_entity()->username;
+ $url = "group/member/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('groups:more'),