Skip to content

Commit

Permalink
MDL-55565 core_backup: Fix warning when restoring question categories
Browse files Browse the repository at this point in the history
Fixed a call to get_records_sql, which was being used incorrectly in
restore_find_best_target_context to determine a unique contextid.
  • Loading branch information
snake authored and danpoltawski committed Aug 22, 2016
1 parent 5d27e53 commit 4f424b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/util/dbops/restore_dbops.class.php
Expand Up @@ -795,7 +795,7 @@ public static function restore_find_best_target_context($categories, $courseid,
// 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";
Expand Down

0 comments on commit 4f424b7

Please sign in to comment.