Permalink
Browse files

Merge branch 'MDL-63234-master' of git://github.com/andrewnicols/moodle

  • Loading branch information...
dmonllao committed Aug 27, 2018
2 parents 12f7678 + 1a5a0b9 commit 39d5bf09ebe748cf17993535bd8a3eb4fae4f1b0
Showing with 6 additions and 3 deletions.
  1. +6 −3 blocks/recent_activity/classes/task/cleanup.php
@@ -50,9 +50,12 @@ public function get_name() {
* Remove old entries from table block_recent_activity
*/
public function execute() {
global $DB;
global $CFG, $DB;
require_once("{$CFG->dirroot}/course/lib.php");
// Those entries will never be displayed as RECENT anyway.
$DB->delete_records_select('block_recent_activity', 'timecreated < ?',
array(time() - COURSE_MAX_RECENT_PERIOD));
$DB->delete_records_select('block_recent_activity', 'timecreated < ?', [
time() - COURSE_MAX_RECENT_PERIOD,
]);
}
}

0 comments on commit 39d5bf0

Please sign in to comment.