aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-11-10 23:50:43 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-11-10 23:50:43 +0100
commitb2f2a8774586a49dee066a1fef674b26c04c5755 (patch)
tree36a2e6942dfe10234f6c5d7e9d615d880f2faaa4 /lib/filesystem.php
parent5a8235eca0c282d79d48f65a5419c6c855ecdc36 (diff)
downloadnextcloud-server-b2f2a8774586a49dee066a1fef674b26c04c5755.tar.gz
nextcloud-server-b2f2a8774586a49dee066a1fef674b26c04c5755.zip
use cache for searching files
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 93f52423332..c3830b34168 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -390,15 +390,13 @@ class OC_Filesystem{
$files=array();
$fakeRoot=self::$fakeRoot;
$fakeRootLength=strlen($fakeRoot);
- foreach(self::$storages as $mountpoint=>$storage){
- $results=$storage->search($query);
- if(is_array($results)){
- foreach($results as $result){
- $file=str_replace('//','/',$mountpoint.$result);
- if(substr($file,0,$fakeRootLength)==$fakeRoot){
- $file=substr($file,$fakeRootLength);
- $files[]=$file;
- }
+ $results=OC_FileCache::search($query);
+ if(is_array($results)){
+ foreach($results as $result){
+ $file=str_replace('//','/',$mountpoint.$result);
+ if(substr($file,0,$fakeRootLength)==$fakeRoot){
+ $file=substr($file,$fakeRootLength);
+ $files[]=$file;
}
}
}