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 { ...@@ -593,7 +593,7 @@ sub sendMail {
my $showattachurlbase = my $showattachurlbase =
Param('urlbase') . "attachment.cgi?id="; 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: ' : ''; $substs{"neworchanged"} = $isnew ? 'New: ' : '';
......
...@@ -34,7 +34,7 @@ my $id = $cgi->param('attach_id'); ...@@ -34,7 +34,7 @@ my $id = $cgi->param('attach_id');
detaint_natural($id) if defined $id; detaint_natural($id) if defined $id;
$id ||= ""; $id ||= "";
print $cgi->redirect(-location=>"attachment.cgi?id=$id&action=view", print $cgi->redirect(-location=>"attachment.cgi?id=$id",
-status=>'301 Permanent Redirect'); -status=>'301 Permanent Redirect');
exit; exit;
...@@ -82,14 +82,14 @@ ...@@ -82,14 +82,14 @@
</table> </table>
[% IF a.isviewable %] [% 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. <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> </iframe>
[% ELSE %] [% ELSE %]
<p><b> <p><b>
Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*. 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> </b></p>
[% END %] [% END %]
</div> </div>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
[% "</tr><tr>" IF loop.index > 0 %] [% "</tr><tr>" IF loop.index > 0 %]
<td> <td>
[% IF change.attachid %] [% IF change.attachid %]
<a href="attachment.cgi?id=[% change.attachid %]&amp;action=view"> <a href="attachment.cgi?id=[% change.attachid %]">
Attachment #[% change.attachid %]</a> Attachment #[% change.attachid %]</a>
[% END %] [% END %]
[% change.field %] [% 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