diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-19 05:49:45 -0700 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-19 05:49:45 -0700 |
commit | 9f9eb1b08f7b677e1b64af4d101d974b6bb326f8 (patch) | |
tree | e3a82786971c884712e8cce142b8e11215e8eddf /lib | |
parent | ae4775a68315c2aaab3f15c8baf8dbd6ee8ccf7a (diff) | |
parent | c2e413e8528835929e6ca60ade0f5a3ad7a210bd (diff) | |
download | nextcloud-server-9f9eb1b08f7b677e1b64af4d101d974b6bb326f8.tar.gz nextcloud-server-9f9eb1b08f7b677e1b64af4d101d974b6bb326f8.zip |
Merge pull request #4263 from owncloud/search_scrollto
initial scrollto implementation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/search/provider/file.php | 3 | ||||
-rw-r--r-- | lib/search/result.php | 4 |
2 files changed, 5 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..42275c2df11 100644 --- a/lib/search/result.php +++ b/lib/search/result.php @@ -7,6 +7,7 @@ class OC_Search_Result{ public $text; public $link; public $type; + public $container; /** * create a new search result @@ -15,10 +16,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; } } |