mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-79509 mod_wiki: Improve comment editing
This commit is contained in:
parent
77766f9c8a
commit
5fec728be9
@ -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);
|
||||
|
@ -835,7 +835,7 @@ class page_wiki_editcomment extends page_wiki {
|
||||
|
||||
if ($this->format == 'html') {
|
||||
$com->action = 'edit';
|
||||
$com->entrycomment_editor['text'] = $com->content;
|
||||
$com->entrycomment_editor['text'] = clean_text($com->content, $this->format);
|
||||
$com->commentoptions = array('trusttext' => true, 'maxfiles' => 0);
|
||||
|
||||
$this->form->set_data($com);
|
||||
|
Loading…
x
Reference in New Issue
Block a user