Commit fe81b423 authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 262141: Enable the creation of bookmarkable URL for bug entry when…

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.
parent 93a343fb
......@@ -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://';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment