summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-12-03 07:31:35 +0100
committerjocuri%softhome.net <>2004-12-03 07:31:35 +0100
commitfe81b42398131b3dc62c320ddd07789cb5545357 (patch)
tree5dc01b043d09fa40e3b6f5c5e9e818252b482255
parent93a343fbef46d08b5a9f9f603bb46e0fe9d89887 (diff)
downloadbugzilla-fe81b42398131b3dc62c320ddd07789cb5545357.tar.gz
bugzilla-fe81b42398131b3dc62c320ddd07789cb5545357.tar.xz
Patch for bug 262141: Enable the creation of bookmarkable URL for bug entry when param commentoncreate is set; patch by Shane H. W. Travis <travis@sedsystems.ca>, r=gerv, a=justdave.
-rwxr-xr-xpost_bug.cgi11
1 files changed, 7 insertions, 4 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 94533e38d..5fc50e66f 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -74,10 +74,6 @@ my $format = GetFormat("bug/create/comment", $::FORM{'format'}, "txt");
$template->process($format->{'template'}, $vars, \$comment)
|| ThrowTemplateError($template->error());
-# Check that if required a description has been provided
-if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
- ThrowUserError("description_required");
-}
ValidateComment($comment);
my $product = $::FORM{'product'};
@@ -120,6 +116,13 @@ if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") {
ThrowUserError("require_summary");
}
+# Check that if required a description has been provided
+# This has to go somewhere after 'maketemplate'
+# or it breaks bookmarks with no comments.
+if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
+ ThrowUserError("description_required");
+}
+
# If bug_file_loc is "http://", the default, strip it out and use an empty
# value.
$::FORM{'bug_file_loc'} = "" if $::FORM{'bug_file_loc'} eq 'http://';