From: terry%mozilla.org <> Date: Tue, 11 May 1999 05:08:58 +0000 (+0000) Subject: Give better error messages when we can't display a bug. X-Git-Tag: bugzilla-2.6~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2adbacb8d2604dc7888216537c248b30cde1128e;p=thirdparty%2Fbugzilla.git Give better error messages when we can't display a bug. --- diff --git a/bug_form.pl b/bug_form.pl index 1d7cae19de..14ec779a62 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -104,7 +104,7 @@ sub quoteUrls { return $text; } -quietly_check_login(); +my $loginok = quietly_check_login(); my $query = " select @@ -149,13 +149,24 @@ if (@row = FetchSQLData()) { $count++; } } else { - my $maintainer = Param("maintainer"); - print "
$query\n";
- exit 0
+ SendSQL("select groupset from bugs where bug_id = $::FORM{'id'}");
+ if (@row = FetchSQLData()) {
+ print "Permission denied.
\n";
+ if ($loginok) {
+ print "Sorry; you do not have the permissions necessary to see\n";
+ print "bug $::FORM{'id'}.\n";
+ } else {
+ print "Sorry; bug $::FORM{'id'} can only be viewed when logged\n";
+ print "into an account with the appropriate permissions. To\n";
+ print "see this bug, you must first\n";
+ print "";
+ print "log in.";
+ }
+ } else {
+ print "Bug not found
\n";
+ print "There does not seem to be a bug numbered $::FORM{'id'}.\n";
+ }
+ exit;
}
$bug{'assigned_to'} = DBID_to_name($bug{'assigned_to'});
diff --git a/show_bug.cgi b/show_bug.cgi
index 75a3bb8e34..803e1a07e1 100755
--- a/show_bug.cgi
+++ b/show_bug.cgi
@@ -22,11 +22,17 @@
use diagnostics;
use strict;
+require "CGI.pl";
+
+ConnectToDatabase();
+
+if ($::FORM{'GoAheadAndLogIn'}) {
+ confirm_login();
+}
+
print "Content-type: text/html\n";
print "\n";
-require "CGI.pl";
-
if (!defined $::FORM{'id'}) {
print "Search By Bug Number
\n";
print "