$age = time() - $post->created;
if ($ownpost) {
- $output .= "<a href=\"$CFG->wwwroot/mod/forum/post.php?delete=$post->id\">".get_string("delete", "forum")."</a>";
+ if (!record_exists("forum_posts", "parent", $post->id)) {
+ $output .= "<a href=\"$CFG->wwwroot/mod/forum/post.php?delete=$post->id\">".get_string("delete", "forum")."</a>";
+ if ($reply) {
+ $output .= ' | ';
+ }
+ }
if ($reply) {
$output .= " | <a target=\"_blank\" href=\"$CFG->wwwroot/mod/forum/post.php?reply=$post->id\">".get_string("replyforum", "forum")."</a>";
}
}
}
if ($ownpost or $isteacher) {
- echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete</a>";
- if ($reply) {
- echo "| ";
- } else {
- echo " ";
+ if (!record_exists("forum_posts", "parent", $post->id)) {
+ echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete</a>";
+ if ($reply) {
+ echo " | ";
+ } else {
+ echo " ";
+ }
}
}
if ($reply) {