Browse files

Bug fix for bug #3614

  • Loading branch information...
1 parent 07a40e5 commit d79aa15c7133ced50ea2d39f6d1edb7672ae45c3 fiedorow committed Jun 23, 2005
Showing with 4 additions and 4 deletions.
  1. +4 −4 mod/forum/lib.php
View
8 mod/forum/lib.php
@@ -196,7 +196,7 @@ function forum_delete_instance($id) {
if ($discussions = get_records('forum_discussions', 'forum', $forum->id)) {
foreach ($discussions as $discussion) {
- if (! forum_delete_discussion($discussion)) {
+ if (! forum_delete_discussion($discussion, true)) {
$result = false;
}
}
@@ -1705,7 +1705,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
'" title="'.$strpruneheading.'">'.$strprune.'</a>';
}
- if (($ownpost and $age < $CFG->maxeditingtime) or $isteacher) {
+ if ($ownpost or $isteacher) {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?delete='.$post->id.'">'.$strdelete.'</a>';
}
@@ -2377,7 +2377,7 @@ function forum_add_discussion($discussion,&$message) {
}
-function forum_delete_discussion($discussion) {
+function forum_delete_discussion($discussion, $fulldelete=false) {
// $discussion is a discussion record object
$result = true;
@@ -2389,7 +2389,7 @@ function forum_delete_discussion($discussion) {
if (! delete_records("forum_ratings", "post", "$post->id")) {
$result = false;
}
- if (! forum_delete_post($post)) {
+ if (! forum_delete_post($post, $fulldelete)) {
$result = false;
}
}

0 comments on commit d79aa15

Please sign in to comment.