From 3234f4324ecdbee482f183d79e7102aaa50c7005 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sat, 27 Sep 2014 21:50:01 +0800 Subject: [PATCH] MDL-46391 messages: Add search button under contact list. Add search button to only Message navigation -> Contacts section. --- message/lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/message/lib.php b/message/lib.php index c027b5c7eca..28fc9f8a264 100644 --- a/message/lib.php +++ b/message/lib.php @@ -130,9 +130,8 @@ function message_print_contact_selector($countunreadtotal, $viewing, $user1, $us } } - // Only show the search button if we're viewing our own messages. - // Search isn't currently able to deal with user A wanting to search user B's messages. - if ($showactionlinks) { + // Only show the search button if we're viewing our own contacts. + if ($viewing == MESSAGE_VIEW_CONTACTS && $user2 == null) { echo html_writer::start_tag('form', array('action' => 'index.php','method' => 'GET')); echo html_writer::start_tag('fieldset'); $managebuttonclass = 'visible';