summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authormbi <knox@users.noreply.github.com>2015-12-08 21:02:52 +0100
committermbi <knox@users.noreply.github.com>2015-12-08 21:02:52 +0100
commit508c46a112d3d53b4b0668efcbe1403eb2e143b8 (patch)
tree29ef86459abae1dcaadf75203851ab9b39ec43bd /lib/private/files
parent27f420e0a797f8a56b5e83e8dd8e19df289c766b (diff)
parent13993c4a6db83c0a637fc7c20da0470acae47208 (diff)
downloadnextcloud-server-508c46a112d3d53b4b0668efcbe1403eb2e143b8.tar.gz
nextcloud-server-508c46a112d3d53b4b0668efcbe1403eb2e143b8.zip
Merge branch 'master' into master
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/filesystem.php1
-rw-r--r--lib/private/files/view.php8
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 9f243c15a4c..9d1b7150687 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -58,7 +58,6 @@
namespace OC\Files;
-use OC\Cache\File;
use OC\Files\Config\MountProviderCollection;
use OC\Files\Storage\StorageFactory;
use OCP\Files\Config\IMountProvider;
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 7854790d0e5..6abefff4198 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -1427,13 +1427,9 @@ class View {
if ($mimetype_filter) {
$files = array_filter($files, function (FileInfo $file) use ($mimetype_filter) {
if (strpos($mimetype_filter, '/')) {
- if ($file->getMimetype() === $mimetype_filter) {
- $result[] = $file;
- }
+ return $file->getMimetype() === $mimetype_filter;
} else {
- if ($file->getMimePart() === $mimetype_filter) {
- $result[] = $file;
- }
+ return $file->getMimePart() === $mimetype_filter;
}
});
}