MDL-79509 mod_wiki: Improve comment editing

This commit is contained in:
Mikel Martín
2023-10-04 02:05:15 +02:00
committed by Jenkins
parent ce38fda651
commit 4777e96a28
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))) {
print_error('invalidcomment');
}
if ($USER->id != $comment->userid) {
throw new \moodle_exception('cannotviewpage', 'wiki');
}
}
$editcomments->set_page($page);