From f51479b5668134689926ef8968b3f88f10a59b2d Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 9 Oct 2005 17:18:45 +0000 Subject: [PATCH] r516: Can't hide the initial report --- editcomment.php | 6 ++++++ templates/editcomment.tpl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/editcomment.php b/editcomment.php index 20b056c..85a0920 100644 --- a/editcomment.php +++ b/editcomment.php @@ -61,6 +61,11 @@ if ($_POST['do'] == 'update') $message->error($lang->string('You need to enter text into the comment field')); } + if ($bugsys->in['commentid'] == $bug['initialreport'] AND $bugsys->in['hidden']) + { + $message->error($lang->string('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.')); + } + $bugsys->in['comment_parsed'] = $bugsys->in['comment']; if (!$bugsys->options['allowhtml']) @@ -102,6 +107,7 @@ if ($_REQUEST['do'] == 'edit') $comment['posttime'] = $datef->format($bugsys->options['dateformat'], $comment['dateline']); $comment['postby'] = construct_user_display($comment); $comment['comment'] = $bugsys->sanitize($comment['comment']); + $show['hide'] = ($bug['initialreport'] != $comment['commentid'] ? true : false); eval('$template->flush("' . $template->fetch('editcomment') . '");'); } diff --git a/templates/editcomment.tpl b/templates/editcomment.tpl index cf05153..ccb28c4 100644 --- a/templates/editcomment.tpl +++ b/templates/editcomment.tpl @@ -20,7 +20,7 @@ $header
{@"Posted on %1$s by %2$s"}
-
style="color: red">{@"Hidden"}: checked="checked" />
+
style="color: red">{@"Hidden"}: checked="checked" />
-- 2.22.5