mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-63234-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
39d5bf09eb
@ -50,9 +50,12 @@ class cleanup extends \core\task\scheduled_task {
|
||||
* 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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user