summaryrefslogtreecommitdiff
path: root/lib/viewers
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-06 09:00:52 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-06-06 09:00:52 (GMT)
commita8493651fb2cdc4e12248c443e1f3083c8051345 (patch)
tree103fadaf1bd5bddd5e4e685ccb8ab158757825c3 /lib/viewers
parent1d4c3f30e8810c2b9f3ed0742ae7c25a907c277c (diff)
downloadkolab-chwala-a8493651fb2cdc4e12248c443e1f3083c8051345.tar.gz
Disable pdf and pdf viewers on IE<9
Diffstat (limited to 'lib/viewers')
-rw-r--r--lib/viewers/odf.php7
-rw-r--r--lib/viewers/pdf.php8
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/viewers/odf.php b/lib/viewers/odf.php
index 5a5112b..6d97f2e 100644
--- a/lib/viewers/odf.php
+++ b/lib/viewers/odf.php
@@ -57,6 +57,13 @@ class file_viewer_odf extends file_viewer
public function __construct($api)
{
$this->api = $api;
+
+ $browser = $api->get_browser();
+
+ // disable viewer in unsupported browsers
+ if ($browser->ie && $browser->ver < 9) {
+ $this->mimetypes = array();
+ }
}
/**
diff --git a/lib/viewers/pdf.php b/lib/viewers/pdf.php
index 442714b..a402fd4 100644
--- a/lib/viewers/pdf.php
+++ b/lib/viewers/pdf.php
@@ -43,8 +43,14 @@ class file_viewer_pdf extends file_viewer
*/
public function __construct($api)
{
- // @TODO: disable types not supported by some browsers
$this->api = $api;
+
+ $browser = $api->get_browser();
+
+ // disable viewer in unsupported browsers
+ if ($browser->ie && $browser->ver < 9) {
+ $this->mimetypes = array();
+ }
}
/**