diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-04-05 23:18:44 +0200 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-04-05 23:18:44 +0200 |
commit | 96c99125da5fe74d4a8fa329869cca7f775805cf (patch) | |
tree | 6bfb2ea45d3e0773120a5a31dd388ba3da9ca0f7 /lib/filecache.php | |
parent | fe3d3be399f7b64b3f81c4f8fcd932b2d810ee45 (diff) | |
download | nextcloud-server-96c99125da5fe74d4a8fa329869cca7f775805cf.tar.gz nextcloud-server-96c99125da5fe74d4a8fa329869cca7f775805cf.zip |
mimetype filter for filepicker
Diffstat (limited to 'lib/filecache.php')
-rw-r--r-- | lib/filecache.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index 4a4183cbdb5..cdd91dcbfa4 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -240,7 +240,7 @@ class OC_FileCache{ * - encrypted * - versioned */ - public static function getFolderContent($path,$root=''){ + public static function getFolderContent($path,$root='',$mimetype_filter=''){ if(self::isUpdated($path,$root)){ self::updateFolder($path,$root); } @@ -252,8 +252,8 @@ class OC_FileCache{ } $path=$root.$path; $parent=self::getFileId($path); - $query=OC_DB::prepare('SELECT name,ctime,mtime,mimetype,size,encrypted,versioned,writable FROM *PREFIX*fscache WHERE parent=?'); - $result=$query->execute(array($parent))->fetchAll(); + $query=OC_DB::prepare('SELECT name,ctime,mtime,mimetype,size,encrypted,versioned,writable FROM *PREFIX*fscache WHERE parent=? AND (mimetype LIKE ? OR mimetype = ?)'); + $result=$query->execute(array($parent, $mimetype_filter.'%', 'httpd/unix-directory'))->fetchAll(); if(is_array($result)){ return $result; }else{ |