Skip to content

Commit

Permalink
Merge branch 'MDL-60039_master' of git://github.com/dmonllao/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Sep 12, 2017
2 parents 68e3c5f + d08f177 commit 77d2c7b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2466,5 +2466,14 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2017090700.01);
}

if ($oldversion < 2017091200.00) {
// Force all messages to be reindexed.
set_config('core_message_message_sent_lastindexrun', '0', 'core_search');
set_config('core_message_message_received_lastindexrun', '0', 'core_search');

// Main savepoint reached.
upgrade_main_savepoint(true, 2017091200.00);
}

return true;
}
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
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2017090700.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2017091200.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.

Expand Down

0 comments on commit 77d2c7b

Please sign in to comment.