]> source.dussan.org Git - nextcloud-server.git/commitdiff
translate the mimtype/mimepart to readable in the searchByMime function
authorTheSFReader <TheSFReader@gmail.com>
Sun, 3 Feb 2013 10:06:26 +0000 (11:06 +0100)
committerTheSFReader <TheSFReader@gmail.com>
Sun, 3 Feb 2013 10:06:26 +0000 (11:06 +0100)
lib/files/cache/cache.php

index 69cbaea8516760b3fde33371d8c8efd6ec950088..dcb6e8fd39ac7fd8441027356a150772d294bb6c 100644 (file)
@@ -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;
        }
 
        /**