From: lpsolit%gmail.com <> Date: Thu, 2 Mar 2006 06:46:21 +0000 (+0000) Subject: Bug 281358: Attachment links in bugmail are different from the link in show_bug.cgi... X-Git-Tag: bugzilla-2.23.1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ba411e9446f9d0ba1cd1e0f555387d346db5001;p=thirdparty%2Fbugzilla.git Bug 281358: Attachment links in bugmail are different from the link in show_bug.cgi - Patch by timeless r=LpSolit a=justdave --- diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index da40057302..e20fb5f611 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 82fc1ba9a9..f535d5c9da 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 03ad0ea470..ca2690c6e8 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 48fafe847b..2a96b8689f 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 %]