From 0bedd3c7975bc66dad9624fe696ef4d435e0b65a Mon Sep 17 00:00:00 2001 From: Martin Dougiamas Date: Thu, 29 Apr 2010 09:51:35 +0000 Subject: [PATCH] MDL-21579 Improved table checking using the shorthand method --- lib/sessionlib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/sessionlib.php b/lib/sessionlib.php index eeca0a77089..17d97bb8fe3 100644 --- a/lib/sessionlib.php +++ b/lib/sessionlib.php @@ -154,8 +154,7 @@ abstract class session_stub implements moodle_session { public function terminate_current() { global $CFG, $SESSION, $USER, $DB; - $table = new xmldb_table('external_tokens'); // May not exist if database is being reinstalled - if ($DB->get_manager()->table_exists($table)) { + if ($DB->get_manager()->table_exists('external_tokens')) { $DB->delete_records('external_tokens', array('sid'=>session_id(), 'tokentype'=>EXTERNAL_TOKEN_EMBEDDED)); }