MDL-21579 "Implement session token for embedded application" Oops. Error in sql...
authorJamie Pratt <me@jamiep.org>
Mon, 3 May 2010 06:36:52 +0000 (06:36 +0000)
committerJamie Pratt <me@jamiep.org>
Mon, 3 May 2010 06:36:52 +0000 (06:36 +0000)
admin/cron.php

index 3612b00..ef41ce0 100644 (file)
     //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')) {