diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
commit | ccb6d625239b59b283b4d3fc00da704ab743d74c (patch) | |
tree | da9b11d8758b3007c025e4d5487410ae1ca69f68 /mod/messages | |
parent | 1368785a6b6f9c946dcc5eca078540bacce71f60 (diff) | |
download | elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.gz elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.bz2 |
Refs #2543: Updated trunk mods and views to use the new functions from previous 2 commits.
git-svn-id: http://code.elgg.org/elgg/trunk@8079 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages')
-rw-r--r-- | mod/messages/actions/messages/send.php | 2 | ||||
-rw-r--r-- | mod/messages/read.php | 2 | ||||
-rw-r--r-- | mod/messages/send.php | 2 | ||||
-rw-r--r-- | mod/messages/start.php | 28 | ||||
-rw-r--r-- | mod/messages/views/default/messages/topbar.php | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/mod/messages/actions/messages/send.php b/mod/messages/actions/messages/send.php index f6bac606d..a643b44b4 100644 --- a/mod/messages/actions/messages/send.php +++ b/mod/messages/actions/messages/send.php @@ -43,4 +43,4 @@ elgg_clear_sticky_form('messages'); system_message(elgg_echo("messages:posted")); -forward('pg/messages/inbox/' . get_loggedin_user()->username); +forward('pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username); diff --git a/mod/messages/read.php b/mod/messages/read.php index 84ec7e124..561eaa3ce 100644 --- a/mod/messages/read.php +++ b/mod/messages/read.php @@ -37,7 +37,7 @@ if ($inbox) { $body_params = array('message' => $message); $content .= elgg_view_form('messages/reply', $form_params, $body_params); - if (get_loggedin_userid() == elgg_get_page_owner_guid()) { + if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) { $buttons = elgg_view('output/url', array( 'text' => elgg_echo('messages:answer'), 'class' => 'elgg-action-button', diff --git a/mod/messages/send.php b/mod/messages/send.php index 1f31e9e02..884c20cca 100644 --- a/mod/messages/send.php +++ b/mod/messages/send.php @@ -7,7 +7,7 @@ gatekeeper(); -$page_owner = get_loggedin_user(); +$page_owner = elgg_get_logged_in_user_entity(); set_page_owner($page_owner->getGUID()); $title = elgg_echo('messages:add'); diff --git a/mod/messages/start.php b/mod/messages/start.php index a36bbc621..c1693bbcc 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -15,17 +15,17 @@ function messages_init() { elgg_register_library('elgg:messages', elgg_get_plugins_path() . 'messages/lib/messages.php'); // add page menu items - if (isloggedin()) { + if (elgg_is_logged_in()) { elgg_register_menu_item('page', array( 'name' => 'messages:inbox', 'title' => elgg_echo('messages:inbox'), - 'url' => "pg/messages/inbox/" . get_loggedin_user()->username, + 'url' => "pg/messages/inbox/" . elgg_get_logged_in_user_entity()->username, 'context' => 'messages', )); elgg_register_menu_item('page', array( 'name' => 'messages:sentmessages', 'title' => elgg_echo('messages:sentmessages'), - 'url' => "pg/messages/sent/" . get_loggedin_user()->username, + 'url' => "pg/messages/sent/" . elgg_get_logged_in_user_entity()->username, 'context' => 'messages', )); } @@ -75,7 +75,7 @@ function messages_page_handler($page) { elgg_load_library('elgg:messages'); - elgg_push_breadcrumb(elgg_echo('messages'), 'pg/messages/inbox/' . get_loggedin_user()->username); + elgg_push_breadcrumb(elgg_echo('messages'), 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username); if (!isset($page[0])) { $page[0] = 'inbox'; @@ -89,7 +89,7 @@ function messages_page_handler($page) { } if (!isset($page[1])) { - $page[1] = get_loggedin_user()->username; + $page[1] = elgg_get_logged_in_user_entity()->username; } $base_dir = elgg_get_plugins_path() . 'messages'; @@ -207,7 +207,7 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify // If $from == 0, set to current user if ($from == 0) { - $from = (int) get_loggedin_userid(); + $from = (int) elgg_get_logged_in_user_guid(); } // Initialise 2 new ElggObject @@ -262,17 +262,17 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify } $message_contents = strip_tags($body); - if ($send_to != get_loggedin_user() && $notify) { + if ($send_to != elgg_get_logged_in_user_entity() && $notify) { $subject = elgg_echo('messages:email:subject'); $body = elgg_echo('messages:email:body', array( - get_loggedin_user()->name, + elgg_get_logged_in_user_entity()->name, $message_contents, elgg_get_site_url() . "pg/messages/inbox/" . $user->username, - get_loggedin_user()->name, - elgg_get_site_url() . "pg/messages/compose?send_to=" . get_loggedin_userid() + elgg_get_logged_in_user_entity()->name, + elgg_get_site_url() . "pg/messages/compose?send_to=" . elgg_get_logged_in_user_guid() )); - notify_user($send_to, get_loggedin_userid(), $subject, $body); + notify_user($send_to, elgg_get_logged_in_user_guid(), $subject, $body); } $messagesendflag = 0; @@ -299,11 +299,11 @@ function messages_count_unread() { $options = array( 'metadata_name_value_pairs' => array( - 'toId' => get_loggedin_userid(), + 'toId' => elgg_get_logged_in_user_guid(), 'readYet' => 0, 'msg' => 1 ), - 'owner_guid' => get_loggedin_userid() + 'owner_guid' => elgg_get_logged_in_user_guid() ); $num_messages = elgg_get_entities_from_metadata($options); @@ -348,7 +348,7 @@ function messages_site_notify_handler(ElggEntity $from, ElggUser $to, $subject, function messages_user_hover_menu($hook, $type, $return, $params) { $user = $params['entity']; - if (isloggedin() && get_loggedin_userid() != $user->guid) { + if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) { $url = "pg/messages/compose?send_to={$user->guid}"; $item = new ElggMenuItem('send', elgg_echo('messages:sendmessage'), $url); $item->setSection('action'); diff --git a/mod/messages/views/default/messages/topbar.php b/mod/messages/views/default/messages/topbar.php index 20c2f4396..b859b3aee 100644 --- a/mod/messages/views/default/messages/topbar.php +++ b/mod/messages/views/default/messages/topbar.php @@ -5,7 +5,7 @@ * @package ElggMessages */ -if (!isloggedin()) { +if (!elgg_is_logged_in()) { return true; } @@ -20,7 +20,7 @@ if ($num_messages != 0) { } echo elgg_view('output/url', array( - 'href' => 'pg/messages/inbox/' . get_loggedin_user()->username, + 'href' => 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username, 'text' => $text, 'class' => $class, )); |