summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Attachment.pm6
-rw-r--r--extensions/BMO/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl2
-rw-r--r--template/en/default/attachment/createformcontents.html.tmpl1
-rw-r--r--template/en/default/attachment/show-multiple.html.tmpl4
4 files changed, 5 insertions, 8 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 0bdb50c9a..9eac3a147 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -297,10 +297,8 @@ sub is_viewable {
# We assume we can view all text and image types.
return 1 if ($contenttype =~ /^(text|image)\//);
- # Mozilla can view XUL. Note the trailing slash on the Gecko detection to
- # avoid sending XUL to Safari.
- return 1 if (($contenttype =~ /^application\/vnd\.mozilla\./)
- && ($cgi->user_agent() =~ /Gecko\//));
+ # Modern browsers support PDF as well.
+ return 1 if ($contenttype eq 'application/pdf');
# If it's not one of the above types, we check the Accept: header for any
# types mentioned explicitly.
diff --git a/extensions/BMO/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl b/extensions/BMO/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl
deleted file mode 100644
index 3dc727b87..000000000
--- a/extensions/BMO/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl
+++ /dev/null
@@ -1,2 +0,0 @@
-[% mimetypes.push({type => "image/svg+xml", desc => "SVG image"}) %]
-[% mimetypes.push({type => "application/vnd.mozilla.xul+xml", desc => "XUL"}) %] \ No newline at end of file
diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl
index 61ddceac3..efb24e3e9 100644
--- a/template/en/default/attachment/createformcontents.html.tmpl
+++ b/template/en/default/attachment/createformcontents.html.tmpl
@@ -120,6 +120,7 @@
{type => "image/gif", desc => "GIF image"},
{type => "image/jpeg", desc => "JPEG image"},
{type => "image/png", desc => "PNG image"},
+ {type => "image/svg+xml", desc => "SVG image"},
{type => "application/pdf", desc => "PDF document"},
{type => "application/octet-stream", desc => "binary file"}]
%]
diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl
index c28d5dfd6..6a7bb4b9b 100644
--- a/template/en/default/attachment/show-multiple.html.tmpl
+++ b/template/en/default/attachment/show-multiple.html.tmpl
@@ -35,7 +35,7 @@
%]
[% IF hide_obsolete %]
<div id="hidden_obsolete_message">
- Obsolete attachments are hidden. To view all attachments (including obsolete)
+ Obsolete attachments are hidden. To view all attachments (including obsolete)
<a href="attachment.cgi?bugid=[% bug.id FILTER html %]&amp;action=viewall">click here</a>.
</div>
[% END %]
@@ -106,7 +106,7 @@
[% END %]
[% ELSE %]
<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/pdf.
<a href="attachment.cgi?id=[% a.id %]">Download the attachment instead</a>.
</b></p>
[% END %]