Skip to content

Commit

Permalink
MDL-60039 messaging: global search index using timeread
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonllao authored and David Monllao committed Sep 7, 2017
1 parent 32f9550 commit 8744db9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions message/classes/search/message_received.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function get_recordset_by_timestamp($modifiedfrom = 0) {
// We don't want to index messages received from noreply and support users.
$params = array('modifiedfrom' => $modifiedfrom, 'noreplyuser' => \core_user::NOREPLY_USER,
'supportuser' => \core_user::SUPPORT_USER);
return $DB->get_recordset_select('message_read', 'timecreated >= :modifiedfrom AND
useridto != :noreplyuser AND useridto != :supportuser', $params, 'timecreated ASC');
return $DB->get_recordset_select('message_read', 'timeread >= :modifiedfrom AND
useridto != :noreplyuser AND useridto != :supportuser', $params, 'timeread ASC');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions message/classes/search/message_sent.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public function get_recordset_by_timestamp($modifiedfrom = 0) {
// We don't want to index messages sent by noreply and support users.
$params = array('modifiedfrom' => $modifiedfrom, 'noreplyuser' => \core_user::NOREPLY_USER,
'supportuser' => \core_user::SUPPORT_USER);
return $DB->get_recordset_select('message_read', 'timecreated >= :modifiedfrom AND
useridfrom != :noreplyuser AND useridfrom != :supportuser', $params, 'timecreated ASC');
return $DB->get_recordset_select('message_read', 'timeread >= :modifiedfrom AND
useridfrom != :noreplyuser AND useridfrom != :supportuser', $params, 'timeread ASC');
}

/**
Expand Down

0 comments on commit 8744db9

Please sign in to comment.