Search: fix Notice and thus broken search with activiated error reporting
This commit is contained in:
parent
33e9399ba3
commit
68fa2b10da
|
@ -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,8 +35,10 @@ class OC_Search_Provider_File extends OC_Search_Provider{
|
|||
}
|
||||
}
|
||||
}
|
||||
if(!$skip) {
|
||||
$results[] = new OC_Search_Result($name, $text, $link, $type);
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue