summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-13 10:35:45 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-13 10:38:08 +0200
commit59efcb63a334b70b3f392a4eea18c67e79ac4a21 (patch)
treeb2c1403859e1d85963d60335628bcbaf4d2bc680 /apps/files/lib
parent0a72e66e9feaf555c485f312de1cd3377aeb6a9f (diff)
downloadnextcloud-server-59efcb63a334b70b3f392a4eea18c67e79ac4a21.tar.gz
nextcloud-server-59efcb63a334b70b3f392a4eea18c67e79ac4a21.zip
fix filepicker
* add ability to filter for mimetype * fixes #15526 * fixes #11563
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index cc1b2d3cfbe..e966e60d00a 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -196,10 +196,11 @@ class Helper {
* @param string $dir path to the directory
* @param string $sortAttribute attribute to sort on
* @param bool $sortDescending true for descending sort, false otherwise
+ * @param string $mimetypeFilter limit returned content to this mimetype or mimepart
* @return \OCP\Files\FileInfo[] files
*/
- public static function getFiles($dir, $sortAttribute = 'name', $sortDescending = false) {
- $content = \OC\Files\Filesystem::getDirectoryContent($dir);
+ public static function getFiles($dir, $sortAttribute = 'name', $sortDescending = false, $mimetypeFilter = '') {
+ $content = \OC\Files\Filesystem::getDirectoryContent($dir, $mimetypeFilter);
return self::sortFiles($content, $sortAttribute, $sortDescending);
}