mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-45258 tags:context object/0 should not be passed to tag_set()
This commit is contained in:
parent
83ddacfff7
commit
a9282e4120
@ -1215,6 +1215,9 @@ abstract class restore_dbops {
|
||||
$usertag = (object)$usertag;
|
||||
$tags[] = $usertag->rawname;
|
||||
}
|
||||
if (empty($newuserctxid)) {
|
||||
$newuserctxid = null; // Tag apis expect a null contextid not 0.
|
||||
}
|
||||
tag_set('user', $newuserid, $tags, 'core', $newuserctxid);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ if ($tagnew = $tagform->get_data()) {
|
||||
}
|
||||
|
||||
//updated related tags
|
||||
tag_set('tag', $tagnew->id, explode(',', trim($tagnew->relatedtags)), 'core', $systemcontext);
|
||||
tag_set('tag', $tagnew->id, explode(',', trim($tagnew->relatedtags)), 'core', $systemcontext->id);
|
||||
//print_object($tagnew); die();
|
||||
|
||||
redirect($CFG->wwwroot.'/tag/index.php?tag='.rawurlencode($tag->name)); // must use $tag here, as the name isn't in the edit form
|
||||
|
Loading…
x
Reference in New Issue
Block a user