From f1bf7ee85a2c2a170e5e034ff5ee66ed374feb7c Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 5 Dec 2012 01:19:20 +0100 Subject: Refs #4842. Fixed typo. --- mod/messages/pages/messages/read.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mod/messages') diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php index eb36eaa4b..c25ba9ec3 100644 --- a/mod/messages/pages/messages/read.php +++ b/mod/messages/pages/messages/read.php @@ -38,8 +38,7 @@ if ($inbox) { ); $body_params = array('message' => $message); $content .= elgg_view_form('messages/reply', $form_params, $body_params); - $from_user = get_user($message->fromID); - + $from_user = get_user($message->fromId); if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid() && $from_user) { elgg_register_menu_item('title', array( 'name' => 'reply', -- cgit v1.2.3 From b3b12344bfee097b06019d6ee83b1952cb3088ea Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 5 Dec 2012 01:24:02 +0100 Subject: Refs #4842. Relating replies to original messages. --- mod/messages/actions/messages/send.php | 2 +- mod/messages/start.php | 3 +++ mod/messages/views/default/forms/messages/reply.php | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'mod/messages') diff --git a/mod/messages/actions/messages/send.php b/mod/messages/actions/messages/send.php index 9d9f6c8b7..16a971ad2 100644 --- a/mod/messages/actions/messages/send.php +++ b/mod/messages/actions/messages/send.php @@ -11,7 +11,7 @@ $recipient_guid = get_input('recipient_guid'); elgg_make_sticky_form('messages'); -//$reply = get_input('reply',0); // this is the guid of the message replying to +$reply = get_input('reply',0); // this is the guid of the message replying to if (!$recipient_guid) { register_error(elgg_echo("messages:user:blank")); diff --git a/mod/messages/start.php b/mod/messages/start.php index 2e61d6e21..7971816e3 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -93,6 +93,9 @@ function messages_page_handler($page) { $page[1] = elgg_get_logged_in_user_entity()->username; } + $user = get_user_by_username($page[1]); + //elgg_set_page_owner_guid($user->guid); + $base_dir = elgg_get_plugins_path() . 'messages/pages/messages'; switch ($page[0]) { diff --git a/mod/messages/views/default/forms/messages/reply.php b/mod/messages/views/default/forms/messages/reply.php index 9f3f4b57e..a0a01afce 100644 --- a/mod/messages/views/default/forms/messages/reply.php +++ b/mod/messages/views/default/forms/messages/reply.php @@ -15,6 +15,11 @@ echo elgg_view('input/hidden', array( 'name' => 'recipient_guid', 'value' => $vars['message']->fromId, )); +echo elgg_view('input/hidden', array( + 'name' => 'reply', + 'value' => $vars['message']->guid, +)); + ?>
@@ -35,4 +40,4 @@ echo elgg_view('input/hidden', array(
elgg_echo('messages:send'))); ?> -
\ No newline at end of file + -- cgit v1.2.3