Skip to content

Commit 5bc7668

Browse files
committed
Revert "Use CONTEXT_MODULE constant in sql"
This reverts commit a434ef8.
1 parent e41ea1e commit 5bc7668

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

db/upgrade.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,10 @@ function xmldb_cms_upgrade($oldversion) {
426426
JOIN {cms} cms ON cms.id = cfd.instanceid
427427
JOIN {course_modules} cm ON cm.instance = cms.id
428428
JOIN {modules} m ON m.id = cm.module AND m.name = 'cms'
429-
JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulecontextlevel
429+
JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = 70
430430
WHERE f.contextid = 1 AND f.component = 'customfield_textarea' AND f.filearea = 'value'";
431-
$params = ['modulecontextlevel' => CONTEXT_MODULE];
432431

433-
$records = $DB->get_recordset_sql($sql, $params);
432+
$records = $DB->get_recordset_sql($sql);
434433
foreach ($records as $record) {
435434
// Update the record with the new context id and path name hash.
436435
$record->contextid = $record->ctxid;

0 commit comments

Comments
 (0)