зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
c8c08fb1c2
Коммит
a468f04747
|
@ -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 %]&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 %]&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 %]&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 %]&action=view">
|
||||
<a href="attachment.cgi?id=[% change.attachid %]">
|
||||
Attachment #[% change.attachid %]</a>
|
||||
[% END %]
|
||||
[% change.field %]
|
||||
|
|
Загрузка…
Ссылка в новой задаче