aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-10-02 05:41:03 +0000
committergerv%gerv.net <>2002-10-02 05:41:03 +0000
commit60b331bc2a1d89296f5c57df34171db3b3eca409 (patch)
tree241d081fab876eb42f3784ba67819e65662b0467 /post_bug.cgi
parentBug 170903 - Remove hard-coded titles and things. Patch by gerv; r=bbaetz. (diff)
downloadbugzilla-60b331bc2a1d89296f5c57df34171db3b3eca409.tar.gz
bugzilla-60b331bc2a1d89296f5c57df34171db3b3eca409.tar.bz2
bugzilla-60b331bc2a1d89296f5c57df34171db3b3eca409.zip
Bug 163114 - Templatise all calls to DisplayError. Patch C. Patch by gerv; r=burnus.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi16
1 files changed, 4 insertions, 12 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 206c75c57..c07d07d99 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -94,23 +94,15 @@ umask 0;
# Some sanity checking
if(Param("usebuggroupsentry") && GroupExists($product)) {
- if(!UserInGroup($product)) {
- DisplayError("Sorry; you do not have the permissions necessary to enter
- a bug against this product.", "Permission Denied");
- exit;
- }
+ UserInGroup($product) ||
+ ThrowUserError("entry_access_denied", {product => $product});
}
my $component_id = get_component_id($product_id, $::FORM{component});
-if (!$component_id) {
- DisplayError("You must choose a component that corresponds to this bug.
- If necessary, just guess.");
- exit;
-}
+$component_id || ThrowUserError("require_component");
if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") {
- DisplayError("You must enter a summary for this bug.");
- exit;
+ ThrowUserError("require_summary");
}
# If bug_file_loc is "http://", the default, strip it out and use an empty