From d03155a8d509685f64bc4b56ba3e76ef5a94c7d9 Mon Sep 17 00:00:00 2001
From: TheSFReader <TheSFReader@gmail.com>
Date: Sun, 3 Feb 2013 11:06:26 +0100
Subject: [PATCH] translate the mimtype/mimepart to readable in the
 searchByMime function

---
 lib/files/cache/cache.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 69cbaea8516..dcb6e8fd39a 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -410,7 +410,13 @@ class Cache {
 		);
 		$mimetype = $this->getMimetypeId($mimetype);
 		$result = $query->execute(array($mimetype, $this->numericId));
-		return $result->fetchAll();
+		$files = array();
+		while ($row = $result->fetchRow()) {
+			$row['mimetype'] = $this->getMimetype($row['mimetype']);
+			$row['mimepart'] = $this->getMimetype($row['mimepart']);
+			$files[] = $row;
+		}
+		return $files;
 	}
 
 	/**
-- 
GitLab