diff options
author | justdave%syndicomm.com <> | 2003-09-02 08:37:55 +0000 |
---|---|---|
committer | justdave%syndicomm.com <> | 2003-09-02 08:37:55 +0000 |
commit | 5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0 (patch) | |
tree | e3e8541d84b31c785bab49574ef2e91bd7e12dc4 /sanitycheck.cgi | |
parent | 5265829317edd5f340b43d5c2ce6575123a633c0 (diff) | |
download | bugs-5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0.tar bugs-5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0.tar.gz bugs-5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0.tar.bz2 bugs-5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0.tar.xz bugs-5d5a861f0cdcc3779676db9ff14d48dfdec4a0a0.zip |
Bug 190040: sanitycheck now has "view as buglist" links after lists of bugs as well as all listed bugs linked
Patch by GavinS <bugzilla@chimpychompy.org>
r= justdave, a= justdave
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-x | sanitycheck.cgi | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/sanitycheck.cgi b/sanitycheck.cgi index aab9c8d38..2daef91c3 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -49,6 +49,23 @@ sub BugLink { return "<a href=\"show_bug.cgi?id=$id\">$id</a>"; } +# +# Parameter is a list of bug ids. +# +# Return is a string containing a list of all the bugids, as hrefs, +# followed by a link to them all as a buglist +sub BugListLinks { + my @bugs = @_; + + # Historically, GetBugLink() wasn't used here. I'm guessing this + # was because it didn't exist or is too performance heavy, or just + # plain unnecessary + my @bug_links = map(BugLink($_), @bugs); + + return join(', ',@bug_links) . " <a href=\"buglist.cgi?bug_id=" . + join(',',@bugs) . "\">(as buglist)</a>"; +} + ########################################################################### # Start ########################################################################### @@ -199,7 +216,8 @@ foreach my $field (("bug_severity", "bug_status", "op_sys", push (@invalid, FetchOneColumn()); } if (@invalid) { - Alert("Bug(s) found with invalid $field value: ".join(', ',@invalid)); + Alert("Bug(s) found with invalid $field value: ". + BugListLinks(@invalid)); } } @@ -535,8 +553,8 @@ foreach my $b (keys(%realk)) { } if (@badbugs) { @badbugs = sort {$a <=> $b} @badbugs; - Alert("Bug(s) found with incorrect keyword cache: " . - join(', ', @badbugs)); + Alert(scalar(@badbugs) . " bug(s) found with incorrect keyword cache: " . + BugListLinks(@badbugs)); if (exists $::FORM{'rebuildkeywordcache'}) { Status("OK, now fixing keyword cache."); foreach my $b (@badbugs) { @@ -575,11 +593,9 @@ sub BugCheck ($$) { my ($id) = (@row); push (@badbugs, $id); } - - @badbugs = map(BugLink($_), @badbugs); - + if (@badbugs) { - Alert("$errortext: " . join(', ', @badbugs)); + Alert("$errortext: " . BugListLinks(@badbugs)); } } @@ -709,7 +725,8 @@ while (@row = FetchSQLData()) { if (@badbugs > 0) { Alert("Bugs that have changes but no mail sent for at least half an hour: " . - join (", ", @badbugs)); + BugListLinks(@badbugs)); + print qq{<a href="sanitycheck.cgi?rescanallBugMail=1">Send these mails</a>.<p>\n}; } |