From 2ba411e9446f9d0ba1cd1e0f555387d346db5001 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 2 Mar 2006 06:46:21 +0000 Subject: Bug 281358: Attachment links in bugmail are different from the link in show_bug.cgi - Patch by timeless r=LpSolit a=justdave --- Bugzilla/BugMail.pm | 2 +- showattachment.cgi | 2 +- template/en/default/attachment/show-multiple.html.tmpl | 6 +++--- template/en/default/bug/activity/table.html.tmpl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index da4005730..e20fb5f61 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -593,7 +593,7 @@ sub sendMail { my $showattachurlbase = Param('urlbase') . "attachment.cgi?id="; - $newcomments =~ s/(Created an attachment \(id=([0-9]+)\))/$1\n --> \(${showattachurlbase}$2&action=view\)/g; + $newcomments =~ s/(Created an attachment \(id=([0-9]+)\))/$1\n --> \(${showattachurlbase}$2\)/g; } $substs{"neworchanged"} = $isnew ? 'New: ' : ''; diff --git a/showattachment.cgi b/showattachment.cgi index 82fc1ba9a..f535d5c9d 100755 --- a/showattachment.cgi +++ b/showattachment.cgi @@ -34,7 +34,7 @@ my $id = $cgi->param('attach_id'); detaint_natural($id) if defined $id; $id ||= ""; -print $cgi->redirect(-location=>"attachment.cgi?id=$id&action=view", +print $cgi->redirect(-location=>"attachment.cgi?id=$id", -status=>'301 Permanent Redirect'); exit; diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl index 03ad0ea47..ca2690c6e 100644 --- a/template/en/default/attachment/show-multiple.html.tmpl +++ b/template/en/default/attachment/show-multiple.html.tmpl @@ -82,14 +82,14 @@ [% IF a.isviewable %] - [% ELSE %]

Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*. - Download the attachment instead. + Download the attachment instead.

[% END %] diff --git a/template/en/default/bug/activity/table.html.tmpl b/template/en/default/bug/activity/table.html.tmpl index 48fafe847..2a96b8689 100644 --- a/template/en/default/bug/activity/table.html.tmpl +++ b/template/en/default/bug/activity/table.html.tmpl @@ -70,7 +70,7 @@ [% "" IF loop.index > 0 %] [% IF change.attachid %] - + Attachment #[% change.attachid %] [% END %] [% change.field %] -- cgit v1.2.3-24-g4f1b