File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -426,10 +426,11 @@ function xmldb_cms_upgrade($oldversion) {
426
426
JOIN {cms} cms ON cms.id = cfd.instanceid
427
427
JOIN {course_modules} cm ON cm.instance = cms.id
428
428
JOIN {modules} m ON m.id = cm.module AND m.name = 'cms'
429
- JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = 70
429
+ JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulecontextlevel
430
430
WHERE f.contextid = 1 AND f.component = 'customfield_textarea' AND f.filearea = 'value' " ;
431
+ $ params = ['modulecontextlevel ' => CONTEXT_MODULE ];
431
432
432
- $ records = $ DB ->get_recordset_sql ($ sql );
433
+ $ records = $ DB ->get_recordset_sql ($ sql, $ params );
433
434
foreach ($ records as $ record ) {
434
435
// Update the record with the new context id and path name hash.
435
436
$ record ->contextid = $ record ->ctxid ;
You can’t perform that action at this time.
0 commit comments