MDL-79509 mod_wiki: Improve comment editing

This commit is contained in:
Mikel Martín
2023-10-04 02:10:16 +02:00
committed by Jenkins
parent 8f8c4e3153
commit fce36ecf4f
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -64,6 +64,9 @@ if ($action == 'edit') {
if (!$comment = $DB->get_record('comments', array('id' => $commentid))) {
throw new \moodle_exception('invalidcomment');
}
if ($USER->id != $comment->userid) {
throw new \moodle_exception('cannotviewpage', 'wiki');
}
}
$editcomments->set_page($page);