aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
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/messages
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/messages')
-rw-r--r--mod/messages/actions/messages/send.php10
-rw-r--r--mod/messages/read.php4
-rw-r--r--mod/messages/start.php18
-rw-r--r--mod/messages/views/default/object/messages.php4
4 files changed, 18 insertions, 18 deletions
diff --git a/mod/messages/actions/messages/send.php b/mod/messages/actions/messages/send.php
index a643b44b4..9d9f6c8b7 100644
--- a/mod/messages/actions/messages/send.php
+++ b/mod/messages/actions/messages/send.php
@@ -15,19 +15,19 @@ elgg_make_sticky_form('messages');
if (!$recipient_guid) {
register_error(elgg_echo("messages:user:blank"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
$user = get_user($recipient_guid);
if (!$user) {
register_error(elgg_echo("messages:user:nonexist"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
// Make sure the message field, send to field and title are not blank
if (!$body || !$subject) {
register_error(elgg_echo("messages:blank"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
// Otherwise, 'send' the message
@@ -36,11 +36,11 @@ $result = messages_send($subject, $body, $recipient_guid, 0, $reply);
// Save 'send' the message
if (!$result) {
register_error(elgg_echo("messages:error"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
elgg_clear_sticky_form('messages');
system_message(elgg_echo("messages:posted"));
-forward('pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username);
+forward('messages/inbox/' . elgg_get_logged_in_user_entity()->username);
diff --git a/mod/messages/read.php b/mod/messages/read.php
index 47d9b45dc..c5d1d4941 100644
--- a/mod/messages/read.php
+++ b/mod/messages/read.php
@@ -20,9 +20,9 @@ $title = $message->title;
$inbox = false;
if ($page_owner->getGUID() == $message->toId) {
$inbox = true;
- elgg_push_breadcrumb(elgg_echo('messages:inbox'), 'pg/messages/inbox/' . $page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('messages:inbox'), 'messages/inbox/' . $page_owner->username);
} else {
- elgg_push_breadcrumb(elgg_echo('messages:sent'), 'pg/messages/sent/' . $page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('messages:sent'), 'messages/sent/' . $page_owner->username);
}
elgg_push_breadcrumb($title);
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 76acb36a9..3e57eda79 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -19,14 +19,14 @@ function messages_init() {
elgg_register_menu_item('page', array(
'name' => 'messages:inbox',
'text' => elgg_echo('messages:inbox'),
- 'href' => "pg/messages/inbox/" . elgg_get_logged_in_user_entity()->username,
+ 'href' => "messages/inbox/" . elgg_get_logged_in_user_entity()->username,
'context' => 'messages',
));
elgg_register_menu_item('page', array(
'name' => 'messages:sentmessages',
'text' => elgg_echo('messages:sentmessages'),
- 'href' => "pg/messages/sent/" . elgg_get_logged_in_user_entity()->username,
+ 'href' => "messages/sent/" . elgg_get_logged_in_user_entity()->username,
'context' => 'messages',
));
@@ -41,7 +41,7 @@ function messages_init() {
elgg_register_menu_item('topbar', array(
'name' => 'messages',
- 'href' => 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username,
+ 'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,
'text' => $text,
'priority' => 600,
));
@@ -89,13 +89,13 @@ function messages_page_handler($page) {
elgg_load_library('elgg:messages');
- elgg_push_breadcrumb(elgg_echo('messages'), 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username);
+ elgg_push_breadcrumb(elgg_echo('messages'), 'messages/inbox/' . elgg_get_logged_in_user_entity()->username);
if (!isset($page[0])) {
$page[0] = 'inbox';
}
- // supporting the old inbox url /pg/messages/<username>
+ // supporting the old inbox url /messages/<username>
$user = get_user_by_username($page[0]);
if ($user) {
$page[1] = $page[0];
@@ -281,9 +281,9 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
$body = elgg_echo('messages:email:body', array(
elgg_get_logged_in_user_entity()->name,
$message_contents,
- elgg_get_site_url() . "pg/messages/inbox/" . $user->username,
+ elgg_get_site_url() . "messages/inbox/" . $user->username,
elgg_get_logged_in_user_entity()->name,
- elgg_get_site_url() . "pg/messages/compose?send_to=" . elgg_get_logged_in_user_guid()
+ elgg_get_site_url() . "messages/compose?send_to=" . elgg_get_logged_in_user_guid()
));
notify_user($send_to, elgg_get_logged_in_user_guid(), $subject, $body);
@@ -300,7 +300,7 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
* @return string
*/
function messages_url($message) {
- $url = elgg_get_site_url() . 'pg/messages/read/' . $message->getGUID();
+ $url = elgg_get_site_url() . 'messages/read/' . $message->getGUID();
return $url;
}
@@ -363,7 +363,7 @@ function messages_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) {
- $url = "pg/messages/compose?send_to={$user->guid}";
+ $url = "messages/compose?send_to={$user->guid}";
$item = new ElggMenuItem('send', elgg_echo('messages:sendmessage'), $url);
$item->setSection('action');
$return[] = $item;
diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php
index 1c97c8e36..196d8a3ad 100644
--- a/mod/messages/views/default/object/messages.php
+++ b/mod/messages/views/default/object/messages.php
@@ -21,7 +21,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user = get_entity($message->fromId);
$icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
- 'href' => "pg/messages/compose?send_to=$user->guid",
+ 'href' => "messages/compose?send_to=$user->guid",
'text' => $user->name,
));
@@ -36,7 +36,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user = get_entity($message->toId);
$icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
- 'href' => "pg/messages/compose?send_to=$user->guid",
+ 'href' => "messages/compose?send_to=$user->guid",
'text' => elgg_echo('messages:to_user', array($user->name)),
));