From: moodler Date: Mon, 31 May 2004 02:42:26 +0000 (+0000) Subject: Undoing Gustav's checkin from yesterday ... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=14eef464944d435ae0d3086baa0da90a98be065f;p=moodle.git Undoing Gustav's checkin from yesterday ... Sorry, Gustav, but all those record_exists calls were too much overhead. It's better done by a check in the delete page... this will also account for the case where a reply has been made since the post was displayed on screen. --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index affd53e6bb..a1771c23e3 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1114,12 +1114,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course, $age = time() - $post->created; if ($ownpost) { - if (!record_exists("forum_posts", "parent", $post->id)) { - $output .= "wwwroot/mod/forum/post.php?delete=$post->id\">".get_string("delete", "forum").""; - if ($reply) { - $output .= ' | '; - } - } + $output .= "wwwroot/mod/forum/post.php?delete=$post->id\">".get_string("delete", "forum").""; if ($reply) { $output .= "wwwroot/mod/forum/post.php?reply=$post->id\">".get_string("replyforum", "forum").""; } @@ -1257,13 +1252,11 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link } if ($ownpost or $isteacher) { - if (!record_exists("forum_posts", "parent", $post->id)) { - echo "wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete"; - if ($reply) { - echo " | "; - } else { - echo "  "; - } + echo "wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete"; + if ($reply) { + echo " | "; + } else { + echo "  "; } } if ($reply) {