We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 12f7678 + 1a5a0b9 commit 39d5bf0Copy full SHA for 39d5bf0
blocks/recent_activity/classes/task/cleanup.php
@@ -50,9 +50,12 @@ public function get_name() {
50
* Remove old entries from table block_recent_activity
51
*/
52
public function execute() {
53
- global $DB;
+ global $CFG, $DB;
54
+ require_once("{$CFG->dirroot}/course/lib.php");
55
+
56
// Those entries will never be displayed as RECENT anyway.
- $DB->delete_records_select('block_recent_activity', 'timecreated < ?',
- array(time() - COURSE_MAX_RECENT_PERIOD));
57
+ $DB->delete_records_select('block_recent_activity', 'timecreated < ?', [
58
+ time() - COURSE_MAX_RECENT_PERIOD,
59
+ ]);
60
}
61
0 commit comments