MDL-26674 wiki2.0: cleaned wiki event logging patch

This commit is contained in:
Rajesh Taneja
2012-03-19 11:15:06 +08:00
parent b7921fc458
commit 476aea8d8b
15 changed files with 22 additions and 38 deletions
+1 -3
View File
@@ -82,7 +82,6 @@ if ($action == 'add' || $action == 'edit') {
}
if ($action == 'delete') {
add_to_log($course->id, 'wiki', 'delete comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$comm->set_action($action, $commentid, 0);
} else {
if (empty($newcontent)) {
@@ -94,14 +93,13 @@ if ($action == 'delete') {
}
if ($action == 'edit') {
add_to_log($course->id, 'wiki', 'update comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$comm->set_action($action, $id, $content);
} else {
add_to_log($course->id, 'wiki', 'add comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$action = 'add';
$comm->set_action($action, 0, $content);
}
}
add_to_log($course->id, 'wiki', 'comment', "comments.php?pageid=".$pageid, $pageid, $cm->id);
$comm->print_header();
$comm->print_content();