]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
only present a reply button when the message can be replied to
authorMatt Beckett <beck24@gmail.com>
Thu, 4 Oct 2012 18:38:39 +0000 (12:38 -0600)
committerMatt Beckett <beck24@gmail.com>
Thu, 4 Oct 2012 18:38:39 +0000 (12:38 -0600)
mod/messages/pages/messages/read.php

index 19e3ecdd72a85821c053c5e9944fe04288a6f05c..fd3b466a1188cb6bc7bfea00c25203ea63117700 100644 (file)
@@ -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',