summaryrefslogtreecommitdiffstats
path: root/lib/search
diff options
context:
space:
mode:
Diffstat (limited to 'lib/search')
-rw-r--r--lib/search/provider/file.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index f3d235abdce..5fd35fa3e52 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -13,11 +13,18 @@ class OC_Search_Provider_File extends OC_Search_Provider{
switch($mimeBase){
case 'audio':
break;
+ case 'text':
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Text');
+ break;
case 'image':
$results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Images');
break;
default:
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
+ if($mime=='application/xml'){
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Text');
+ }else{
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
+ }
}
}
}