dont show the full path for the files in search results

This commit is contained in:
Robin Appelman 2011-07-31 01:26:13 +02:00
parent 0b44db954f
commit 1564a40538

View file

@ -6,9 +6,9 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$results=array();
foreach($files as $file){
if(OC_Filesystem::is_dir($file)){
$results[]=new OC_Search_Result(basename($file),$file,OC_Helper::linkTo( 'files', 'index.php?dir='.$file ),'Files');
$results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'index.php?dir='.$file ),'Files');
}else{
$results[]=new OC_Search_Result(basename($file),$file,OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
$results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
}
}
return $results;