aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Beckett <beck24@gmail.com>2012-10-04 12:38:39 -0600
committerMatt Beckett <beck24@gmail.com>2012-10-04 12:38:39 -0600
commita050a89b56f47145a32a7f913c674cdf1f5b7bfc (patch)
tree37aaf419c921bf1b9ac16fa8c832bc9ebfd69461
parent4859e56edf1b17092751a6e9d7d89b03113253db (diff)
downloadelgg-a050a89b56f47145a32a7f913c674cdf1f5b7bfc.tar.gz
elgg-a050a89b56f47145a32a7f913c674cdf1f5b7bfc.tar.bz2
only present a reply button when the message can be replied to
-rw-r--r--mod/messages/pages/messages/read.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php
index 19e3ecdd7..fd3b466a1 100644
--- a/mod/messages/pages/messages/read.php
+++ b/mod/messages/pages/messages/read.php
@@ -38,8 +38,9 @@ if ($inbox) {
);
$body_params = array('message' => $message);
$content .= elgg_view_form('messages/reply', $form_params, $body_params);
-
- if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
+ $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',
'href' => '#messages-reply-form',