Skip to content

Commit

Permalink
Merge branch 'MDL-46391-master' of https://github.com/DmitryNefedov/m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Oct 7, 2014
2 parents 93fad86 + b34eb03 commit be89890
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,11 @@ 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';
if ($viewing == MESSAGE_VIEW_SEARCH) {
$managebuttonclass = 'hiddenelement';
}
$strmanagecontacts = get_string('search','message');
echo html_writer::empty_tag('input', array('type' => 'hidden','name' => 'viewing','value' => MESSAGE_VIEW_SEARCH));
echo html_writer::empty_tag('input', array('type' => 'submit','value' => $strmanagecontacts,'class' => $managebuttonclass));
Expand Down

0 comments on commit be89890

Please sign in to comment.