Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-11-18 17:18:08 +0400
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-11-18 17:18:08 +0400
commitcb656c8321e71812809044c19525bf0b9a639b2c (patch)
tree68db8641d168fa0076a34d0c22778bd2c891df13 /lib
parent477e3a8b87f9a3df3bfd6f4e457971f32a3e5fe8 (diff)
backport search scrollto & filter to stable5
Diffstat (limited to 'lib')
-rw-r--r--lib/search/provider/file.php3
-rw-r--r--lib/search/result.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index 4d88c2a87f1..9bd50931517 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -10,6 +10,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$mime = $fileData['mimetype'];
$name = basename($path);
+ $container = dirname($path);
$text = '';
$skip = false;
if($mime=='httpd/unix-directory') {
@@ -37,7 +38,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
}
}
if(!$skip) {
- $results[] = new OC_Search_Result($name, $text, $link, $type);
+ $results[] = new OC_Search_Result($name, $text, $link, $type, $container);
}
}
return $results;
diff --git a/lib/search/result.php b/lib/search/result.php
index 08beaea151c..6a6300bc2fc 100644
--- a/lib/search/result.php
+++ b/lib/search/result.php
@@ -15,10 +15,11 @@ class OC_Search_Result{
* @param string $link link for the result
* @param string $type the type of result as human readable string ('File', 'Music', etc)
*/
- public function __construct($name, $text, $link, $type) {
+ public function __construct($name, $text, $link, $type, $container) {
$this->name=$name;
$this->text=$text;
$this->link=$link;
$this->type=$type;
+ $this->container=$container;
}
}