From d8e73d61b9c29a3c1eea5ad996f8bc8d5eb6dd9b Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Mon, 15 Aug 2016 14:19:35 +0800 Subject: [PATCH] MDL-55565 core_backup: Fix warning when restoring question categories Fixed a call to get_records_sql, which was being used incorrectly in restore_find_best_target_context to determine a unique contextid. --- backup/util/dbops/restore_dbops.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/util/dbops/restore_dbops.class.php b/backup/util/dbops/restore_dbops.class.php index 6d48d36ea9c..a4c7075ada7 100644 --- a/backup/util/dbops/restore_dbops.class.php +++ b/backup/util/dbops/restore_dbops.class.php @@ -795,7 +795,7 @@ abstract class restore_dbops { // Prepare the query list($stamp_sql, $stamp_params) = $DB->get_in_or_equal($stamps); list($context_sql, $context_params) = $DB->get_in_or_equal($contexts); - $sql = "SELECT contextid + $sql = "SELECT DISTINCT contextid FROM {question_categories} WHERE stamp $stamp_sql AND contextid $context_sql"; -- 2.43.0