Bug 341924: When viewing several bugs at once using show_bug.cgi?format=multiple, invalid bugs should generate an error message - Patch by Frédéric Buclin <LpSolit@gmail.com> r=timeless a=myk
git-svn-id: svn://10.0.0.236/trunk@200254 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -78,8 +78,12 @@ if ($single) {
|
||||
}
|
||||
} else {
|
||||
foreach my $id ($cgi->param('id')) {
|
||||
my $bug = new Bugzilla::Bug($id, Bugzilla->user->id);
|
||||
push @bugs, $bug;
|
||||
# Be kind enough and accept URLs of the form: id=1,2,3.
|
||||
my @ids = split(/,/, $id);
|
||||
foreach (@ids) {
|
||||
my $bug = new Bugzilla::Bug($_, Bugzilla->user->id);
|
||||
push(@bugs, $bug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,3 +45,8 @@ h1 {
|
||||
.bugfields table.timetracking th, .bugfields table.timetracking td {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,22 @@
|
||||
</h1>
|
||||
|
||||
<table class="bugfields">
|
||||
[% IF bug.error %]
|
||||
<tr>
|
||||
<td class="error">
|
||||
[% IF bug.error == "InvalidBugId" %]
|
||||
'[%+ bug.bug_id FILTER html %]' is not a valid [% terms.bug %] number
|
||||
[%- IF Param("usebugaliases") %] nor a known [% terms.bug %] alias[% END %].
|
||||
[% ELSIF bug.error == "NotPermitted" %]
|
||||
You are not allowed to view this [% terms.bug %].
|
||||
[% ELSIF bug.error == "NotFound" %]
|
||||
This [% terms.bug %] cannot be found.
|
||||
[% ELSE %]
|
||||
[%+ bug.error FILTER html %]
|
||||
[% END %]
|
||||
</td>
|
||||
</tr>
|
||||
[% ELSE %]
|
||||
[%# The rightcell block (also called by the row block) automatically shows
|
||||
# the fields from rightcells %]
|
||||
[% rightcells = ['reporter', 'assigned_to'] %]
|
||||
@@ -237,6 +253,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user