MDL-23677, fixed commenting on creole format wiki page

This commit is contained in:
Dongsheng Cai 2010-11-10 09:09:14 +00:00
parent a6f4018954
commit e0f0c304fc
2 changed files with 5 additions and 3 deletions

View File

@ -25,8 +25,10 @@
function wiki_print_editor_wiki($pageid, $content, $editor, $version = -1, $section = null, $upload = false, $deleteuploads = array(), $comesfrom = 'editorview', $commentid = 0) {
global $CFG, $OUTPUT, $PAGE;
if ($comesfrom == 'fromcomments') {
if ($comesfrom == 'editcomments') {
$action = $CFG->wwwroot . '/mod/wiki/instancecomments.php?pageid=' . $pageid . '&id=' . $commentid . '&action=edit';
} else if ($comesfrom == 'addcomments') {
$action = $CFG->wwwroot . '/mod/wiki/instancecomments.php?pageid=' . $pageid . '&id=' . $commentid . '&action=add';
} else {
$action = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $pageid;
}

View File

@ -788,7 +788,7 @@ class page_wiki_editcomment extends page_wiki {
if ($this->format == 'html') {
$this->form->display();
} else {
wiki_print_editor_wiki($this->page->id, null, $this->format, -1, null, false, null, 'fromcomments');
wiki_print_editor_wiki($this->page->id, null, $this->format, -1, null, false, null, 'addcomments');
}
}
@ -809,7 +809,7 @@ class page_wiki_editcomment extends page_wiki {
$commentid = $com->id;
$pageid = $this->page->id;
$destination = $CFG->wwwroot . '/mod/wiki/instancecomments.php?pageid=' . $pageid . '&id=' . $commentid . '&action=' . $action;
wiki_print_editor_wiki($this->page->id, $com->content, $this->format, -1, null, false, array(), 'fromcomments', $commentid);
wiki_print_editor_wiki($this->page->id, $com->content, $this->format, -1, null, false, array(), 'editcomments', $commentid);
}
}