From 6bcef649423a135a0a7ed42a3e5e357639d00082 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Sun, 18 Jun 2006 23:11:59 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20341924:=20When=20viewing=20several=20bugs?= =?UTF-8?q?=20at=20once=20using=20show=5Fbug.cgi=3Fformat=3Dmultiple,=20in?= =?UTF-8?q?valid=20bugs=20should=20generate=20an=20error=20message=20-=20P?= =?UTF-8?q?atch=20by=20Fr=C3=A9d=C3=A9ric=20Buclin=20?= =?UTF-8?q?=20r=3Dtimeless=20a=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@200254 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/show_bug.cgi | 8 ++++++-- .../bugzilla/skins/standard/show_multiple.css | 5 +++++ .../en/default/bug/show-multiple.html.tmpl | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/bugzilla/show_bug.cgi b/mozilla/webtools/bugzilla/show_bug.cgi index 36e32505776..578b6a7a880 100755 --- a/mozilla/webtools/bugzilla/show_bug.cgi +++ b/mozilla/webtools/bugzilla/show_bug.cgi @@ -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); + } } } diff --git a/mozilla/webtools/bugzilla/skins/standard/show_multiple.css b/mozilla/webtools/bugzilla/skins/standard/show_multiple.css index 573a587b645..50875382d7b 100644 --- a/mozilla/webtools/bugzilla/skins/standard/show_multiple.css +++ b/mozilla/webtools/bugzilla/skins/standard/show_multiple.css @@ -45,3 +45,8 @@ h1 { .bugfields table.timetracking th, .bugfields table.timetracking td { width: 10em; } + +.error { + color: red; + font-weight: bold; +} diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl index 9244592d824..023cb957328 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl @@ -59,6 +59,22 @@ + [% IF bug.error %] + + + + [% ELSE %] [%# The rightcell block (also called by the row block) automatically shows # the fields from rightcells %] [% rightcells = ['reporter', 'assigned_to'] %] @@ -237,6 +253,7 @@ [% END %] + [% END %]
+ [% 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 %] +