summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-04 06:44:40 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-04 06:44:40 -0800
commit301afac2913e81414140c25bc21ede563563f76e (patch)
tree5a5f8be8ed76f91443a929e2ea60d14e54ac7e87 /lib/files
parent814369e0cdc9b1d44344f25cc95a7236d25426eb (diff)
parentbc886ac4960b497d7f47d1eb3760c89909e3a7c5 (diff)
downloadnextcloud-server-301afac2913e81414140c25bc21ede563563f76e.tar.gz
nextcloud-server-301afac2913e81414140c25bc21ede563563f76e.zip
Merge pull request #1427 from TheSFReader/master
The mimetype/mimepart need to be readable, even from searchByMime
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/cache/cache.php8
1 files changed, 7 insertions, 1 deletions
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;
}
/**