Permalink
Browse files

MDL-26439 core_message: switched the message search over to displayin…

…g smallmessage instead of fullmessage which contains boilerplate we dont want
  • Loading branch information...
1 parent 9819795 commit b32086390f0d9d1b9abad4970de8bd57e55cc929 @andyjdavis andyjdavis committed Oct 26, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 message/lib.php
View
@@ -1215,7 +1215,7 @@ function message_print_search_results($frm, $showicontext=false, $currentuser=nu
echo html_writer::end_tag('td');
echo html_writer::start_tag('td', array('class' => 'summary'));
- echo message_get_fragment($message->fullmessage, $keywords);
+ echo message_get_fragment($message->smallmessage, $keywords);
echo html_writer::start_tag('div', array('class' => 'link'));
//If the user clicks the context link display message sender on the left
@@ -1600,10 +1600,10 @@ function message_search($searchterms, $fromme=true, $tome=true, $courseid='none'
/// c. Messages to and from user
if ($courseid == SITEID) { /// admin is searching all messages
- $m_read = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.fullmessage, m.timecreated
+ $m_read = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.smallmessage, m.fullmessage, m.timecreated
FROM {message_read} m
WHERE $searchcond", $params, 0, MESSAGE_SEARCH_MAX_RESULTS);
- $m_unread = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.fullmessage, m.timecreated
+ $m_unread = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.smallmessage, m.fullmessage, m.timecreated
FROM {message} m
WHERE $searchcond", $params, 0, MESSAGE_SEARCH_MAX_RESULTS);
@@ -1628,10 +1628,10 @@ function message_search($searchterms, $fromme=true, $tome=true, $courseid='none'
$params['userid'] = $userid;
}
- $m_read = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.fullmessage, m.timecreated
+ $m_read = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.smallmessage, m.fullmessage, m.timecreated
FROM {message_read} m
WHERE $searchcond", $params, 0, MESSAGE_SEARCH_MAX_RESULTS);
- $m_unread = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.fullmessage, m.timecreated
+ $m_unread = $DB->get_records_sql("SELECT m.id, m.useridto, m.useridfrom, m.smallmessage, m.fullmessage, m.timecreated
FROM {message} m
WHERE $searchcond", $params, 0, MESSAGE_SEARCH_MAX_RESULTS);

0 comments on commit b320863

Please sign in to comment.