From c2172d1eb45e5657ed975da034cd20327aa183b3 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 5 Jun 2008 14:18:21 +0000 Subject: [PATCH] MDL-15099 towards enrol dml conversion --- enrol/authorize/enrol.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index ead43b83f8..4634c91f47 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -463,7 +463,7 @@ class enrolment_plugin_authorize $captureday = intval($frm->an_capture_day); $emailexpired = intval($frm->an_emailexpired); if ($captureday > 0 || $emailexpired > 0) { - $lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules'); + $lastcron = $DB->get_field_sql('SELECT max(lastcron) FROM {modules}'); if ((time() - intval($lastcron) > 3600 * 24)) { notify(get_string('admincronsetup', 'enrol_authorize')); } @@ -499,7 +499,7 @@ class enrolment_plugin_authorize */ public function process_config($config) { - global $CFG; + global $CFG, $DB; $mconfig = get_config('enrol/authorize'); // site settings @@ -539,7 +539,7 @@ class enrolment_plugin_authorize $emailexpired = ($emailexpired > 5) ? 5 : (($emailexpired < 0) ? 0 : $emailexpired); if (!empty($reviewval) && ($captureday > 0 || $emailexpired > 0)) { - $lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules'); + $lastcron = $DB->get_field_sql('SELECT max(lastcron) FROM {modules}'); if (time() - intval($lastcron) > 3600 * 24) { return false; } -- 2.39.5