Commit 2ba411e9 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 281358: Attachment links in bugmail are different from the link in…

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
parent 620bb51b
......@@ -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: ' : '';
......
......@@ -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;
......@@ -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>
......
......@@ -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 %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment