From a335f9c4c03f27359b0fe2b7bb41b479895053f2 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 9 Jan 2019 19:05:22 +0800 Subject: [PATCH] MDL-63686 core: recordset => records when fetching contexts --- lib/accesslib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 1cd44dfc97e..43131c2d3d0 100644 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -5893,12 +5893,11 @@ class context_helper extends context { // There are at least two to fetch. // There is no point only fetching a single context as this would be no more efficient than calling the existing code. list($insql, $inparams) = $DB->get_in_or_equal($tofetch, SQL_PARAMS_NAMED); - $ctxs = $DB->get_recordset_select('context', "id {$insql}", $inparams, '', + $ctxs = $DB->get_records_select('context', "id {$insql}", $inparams, '', \context_helper::get_preload_record_columns_sql('{context}')); foreach ($ctxs as $ctx) { self::preload_from_record($ctx); } - $ctxs->close(); } }