From: Jamie Pratt Date: Mon, 3 May 2010 06:36:52 +0000 (+0000) Subject: MDL-21579 "Implement session token for embedded application" Oops. Error in sql... X-Git-Tag: v2.0.0-rc1~3757 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=548da7ee963b085a8c346aa9270d0e9a5e642bba MDL-21579 "Implement session token for embedded application" Oops. Error in sql fixed now. --- diff --git a/admin/cron.php b/admin/cron.php index 3612b00a41a..ef41ce01e46 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -568,8 +568,9 @@ //cleanup old session linked tokens //deletes the session linked tokens that are over a day old. mtrace("Deleting session linked tokens more than one day old...", ''); - $DB->delete_records_select('external_tokens', 'lastaccess < {onedayago} AND tokentype = {tokentype}', + $DB->delete_records_select('external_tokens', 'lastaccess < :onedayago AND tokentype = :tokentype', array('onedayago' => time() - DAYSECS, 'tokentype' => EXTERNAL_TOKEN_EMBEDDED)); + mtrace('done.'); // run any customized cronjobs, if any if ($locals = get_plugin_list('local')) {