summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js21
-rw-r--r--program/steps/mail/show.inc3
2 files changed, 24 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 32ab69f2e..e487a6052 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6384,6 +6384,9 @@ function rcube_webmail()
if (this.env.browser_capabilities.pdf === undefined)
this.env.browser_capabilities.pdf = this.pdf_support_check();
+ if (this.env.browser_capabilities.flash === undefined)
+ this.env.browser_capabilities.flash = this.flash_support_check();
+
if (this.env.browser_capabilities.tif === undefined)
this.tif_support_check();
};
@@ -6447,6 +6450,24 @@ function rcube_webmail()
return 0;
};
+ this.flash_support_check = function()
+ {
+ var plugin = navigator.mimeTypes ? navigator.mimeTypes["application/x-shockwave-flash"] : {};
+
+ if (plugin && plugin.enabledPlugin)
+ return 1;
+
+ if (window.ActiveXObject) {
+ try {
+ if (axObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))
+ return 1;
+ }
+ catch (e) {}
+ }
+
+ return 0;
+ };
+
} // end object rcube_webmail
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index bf1757699..7fcfafcaa 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -69,6 +69,9 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) {
if (empty($_SESSION['browser_caps']['pdf']) && ($key = array_search('application/pdf', $mimetypes)) !== false) {
unset($mimetypes[$key]);
}
+ if (empty($_SESSION['browser_caps']['flash']) && ($key = array_search('application/x-shockwave-flash', $mimetypes)) !== false) {
+ unset($mimetypes[$key]);
+ }
// @TODO: we could convert TIFF to JPEG and display it
if (empty($_SESSION['browser_caps']['tif']) && ($key = array_search('image/tiff', $mimetypes)) !== false) {
unset($mimetypes[$key]);