aboutsummaryrefslogtreecommitdiffstats
path: root/lib/search/provider
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-10-01 19:11:26 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-10-01 19:11:26 +0200
commit68fa2b10da0ebec893d2c1b9cd693987e5777bc6 (patch)
treea223b05c853a5376b7d96e11df02d6880cc6cd40 /lib/search/provider
parent33e9399ba35b468131cfc25c62cdd961080b3c9c (diff)
downloadnextcloud-server-68fa2b10da0ebec893d2c1b9cd693987e5777bc6.tar.gz
nextcloud-server-68fa2b10da0ebec893d2c1b9cd693987e5777bc6.zip
Search: fix Notice and thus broken search with activiated error reporting
Diffstat (limited to 'lib/search/provider')
-rw-r--r--lib/search/provider/file.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index e21278f3918..24832296c59 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -10,6 +10,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$name = basename($path);
$text = '';
+ $skip = false;
if($mime=='httpd/unix-directory') {
$link = OC_Helper::linkTo( 'files', 'index.php', array('dir' => $path));
$type = 'Files';
@@ -18,6 +19,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$mimeBase = $fileData['mimepart'];
switch($mimeBase) {
case 'audio':
+ $skip = true;
break;
case 'text':
$type = 'Text';
@@ -33,7 +35,9 @@ class OC_Search_Provider_File extends OC_Search_Provider{
}
}
}
- $results[] = new OC_Search_Result($name, $text, $link, $type);
+ if(!$skip) {
+ $results[] = new OC_Search_Result($name, $text, $link, $type);
+ }
}
return $results;
}