aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-03-02 06:46:21 +0000
committerlpsolit%gmail.com <>2006-03-02 06:46:21 +0000
commit2ba411e9446f9d0ba1cd1e0f555387d346db5001 (patch)
tree58c79970e11b8c5dfa4c9e15ae7a28e006c9b507
parent620bb51b19bf6bf5c3bced099fc8a65aa1438267 (diff)
downloadbugs-2ba411e9446f9d0ba1cd1e0f555387d346db5001.tar
bugs-2ba411e9446f9d0ba1cd1e0f555387d346db5001.tar.gz
bugs-2ba411e9446f9d0ba1cd1e0f555387d346db5001.tar.bz2
bugs-2ba411e9446f9d0ba1cd1e0f555387d346db5001.tar.xz
bugs-2ba411e9446f9d0ba1cd1e0f555387d346db5001.zip
Bug 281358: Attachment links in bugmail are different from the link in show_bug.cgi - Patch by timeless <timeless@bemail.org> r=LpSolit a=justdave
-rw-r--r--Bugzilla/BugMail.pm2
-rwxr-xr-xshowattachment.cgi2
-rw-r--r--template/en/default/attachment/show-multiple.html.tmpl6
-rw-r--r--template/en/default/bug/activity/table.html.tmpl2
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 @@
</table>
[% IF a.isviewable %]
- <iframe src="attachment.cgi?id=[% a.attachid %]&amp;action=view" width="75%" height="350">
+ <iframe src="attachment.cgi?id=[% a.attachid %]" width="75%" height="350">
<b>You cannot view the attachment on this page because your browser does not support IFRAMEs.
- <a href="attachment.cgi?id=[% a.attachid %]&amp;action=view">View the attachment on a separate page</a>.</b>
+ <a href="attachment.cgi?id=[% a.attachid %]">View the attachment on a separate page</a>.</b>
</iframe>
[% ELSE %]
<p><b>
Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*.
- <a href="attachment.cgi?id=[% a.attachid %]&amp;action=view">Download the attachment instead</a>.
+ <a href="attachment.cgi?id=[% a.attachid %]">Download the attachment instead</a>.
</b></p>
[% END %]
</div>
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 @@
[% "</tr><tr>" IF loop.index > 0 %]
<td>
[% IF change.attachid %]
- <a href="attachment.cgi?id=[% change.attachid %]&amp;action=view">
+ <a href="attachment.cgi?id=[% change.attachid %]">
Attachment #[% change.attachid %]</a>
[% END %]
[% change.field %]