From 5e35524d06a42799076de9a8ca3350e17cf0aefb Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <jan.hendrik.willms@uni-oldenburg.de>
Date: Mon, 23 Feb 2015 13:04:40 +0100
Subject: [PATCH] adjust mime type detection for presenting/image, fixes #1

---
 classes/MarketImage.class.php | 6 +++---
 plugin.manifest               | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/classes/MarketImage.class.php b/classes/MarketImage.class.php
index e2ae574..1e87af1 100644
--- a/classes/MarketImage.class.php
+++ b/classes/MarketImage.class.php
@@ -44,9 +44,9 @@ class MarketImage extends SimpleORMap {
     }
 
     public function outputImage() {
-        $path = self::getImageDataPath()."/".$this->getId();
-        header("Content-Type: ".$this['mimetype']);
-        header("Content-Disposition: inline; filename=".$this['filename']);
+        $path = self::getImageDataPath() . "/" . $this->getId();
+        header("Content-Type: " . mime_content_type($path));
+        header("Content-Disposition: inline; filename=" . $this['filename']);
         echo file_get_contents($path);
     }
 }
\ No newline at end of file
diff --git a/plugin.manifest b/plugin.manifest
index f6c82a4..12feb62 100644
--- a/plugin.manifest
+++ b/plugin.manifest
@@ -1,4 +1,4 @@
 pluginname=PluginMarktplatz
 pluginclassname=PluginMarket
 origin=studip
-version=1.0.10
\ No newline at end of file
+version=1.0.11
-- 
GitLab