|
|
|
@ -573,17 +573,20 @@ class OC_Filesystem{ |
|
|
|
|
|
|
|
|
|
static public function search($query){ |
|
|
|
|
$files=array(); |
|
|
|
|
$fakeRootLength=strlen(self::$fakeRoot); |
|
|
|
|
$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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $files; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|