summaryrefslogtreecommitdiffstats
path: root/application/libraries/Image/Drivers/imagemagick.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-05-02 16:54:44 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-02 16:54:44 +0200
commit4f1b3a1cbf09d63a6e450680bf7a7a6946cdc28e (patch)
tree9410ba616d6da156a31b5f699ac708a706026ad1 /application/libraries/Image/Drivers/imagemagick.php
parentf6b9128dfa5aa5fc9654ed74a1a3b78e69263bbf (diff)
l\I\D\imagemagick: Only process images and pdfs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/Image/Drivers/imagemagick.php')
-rw-r--r--application/libraries/Image/Drivers/imagemagick.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/application/libraries/Image/Drivers/imagemagick.php b/application/libraries/Image/Drivers/imagemagick.php
index bcd8da40b..ed0c70dc6 100644
--- a/application/libraries/Image/Drivers/imagemagick.php
+++ b/application/libraries/Image/Drivers/imagemagick.php
@@ -15,7 +15,15 @@ class imagemagick implements \libraries\Image\ImageDriver {
public static function get_priority($mimetype)
{
- return 100;
+ $mimetype = $mimetype;
+ $base = explode("/", $mimetype)[0];
+
+ if ($base == "image"
+ || in_array($mimetype, array("application/pdf"))) {
+ return 100;
+ }
+
+ return -1;
}
/**