summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-06-05 19:35:24 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-06-05 19:49:21 +0200
commit5034bd1b129b75e7b571cb0ed239d02010c806f7 (patch)
treef92d4c71fde5c9437eda08fc98c0d14039a5e54a /lib/private
parent5dc2e73fe08189833c0398117916b752b0f730d6 (diff)
downloadnextcloud-server-5034bd1b129b75e7b571cb0ed239d02010c806f7.tar.gz
nextcloud-server-5034bd1b129b75e7b571cb0ed239d02010c806f7.zip
minor phpdoc cleanup and imports
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/search.php7
-rw-r--r--lib/private/search/provider/file.php3
-rw-r--r--lib/private/search/result/audio.php2
-rw-r--r--lib/private/search/result/file.php11
-rw-r--r--lib/private/search/result/folder.php2
-rw-r--r--lib/private/search/result/image.php2
6 files changed, 14 insertions, 13 deletions
diff --git a/lib/private/search.php b/lib/private/search.php
index 966b0570135..8ac9e9fdf33 100644
--- a/lib/private/search.php
+++ b/lib/private/search.php
@@ -21,6 +21,7 @@
*/
namespace OC;
+use OC\Search\Provider;
/**
* Provide an interface to all search providers
@@ -32,13 +33,14 @@ class Search {
/**
* Search all providers for $query
- * @param string query
+ * @param string $query
* @return array An array of OC\Search\Result's
*/
public static function search($query) {
self::initProviders();
$results=array();
foreach(self::$providers as $provider) {
+ /** @var $provider Provider */
$results=array_merge($results, $provider->search($query));
}
return $results;
@@ -69,7 +71,8 @@ class Search {
/**
* Register a new search provider to search with
- * @param string $provider class name of a OC\Search\Provider
+ * @param string $class class name of a OC\Search\Provider
+ * @param array $options optional
*/
public static function registerProvider($class, $options=array()) {
self::$registeredProviders[]=array('class'=>$class, 'options'=>$options);
diff --git a/lib/private/search/provider/file.php b/lib/private/search/provider/file.php
index 26ebe309951..daf73cf79c2 100644
--- a/lib/private/search/provider/file.php
+++ b/lib/private/search/provider/file.php
@@ -18,6 +18,7 @@
*/
namespace OC\Search\Provider;
+use OC\Files\Filesystem;
/**
* Provide search results from the 'files' app
@@ -30,7 +31,7 @@ class File extends \OC\Search\Provider {
* @return \OC\Search\Result
*/
function search($query) {
- $files = \OC\Files\Filesystem::search($query);
+ $files = Filesystem::search($query);
$results = array();
// edit results
foreach ($files as $fileData) {
diff --git a/lib/private/search/result/audio.php b/lib/private/search/result/audio.php
index 46f7396ec9f..3adbb400560 100644
--- a/lib/private/search/result/audio.php
+++ b/lib/private/search/result/audio.php
@@ -22,7 +22,7 @@ namespace OC\Search\Result;
/**
* A found audio file
*/
-class Audio extends \OC\Search\Result\File {
+class Audio extends File {
/**
* Type name; translated in templates
diff --git a/lib/private/search/result/file.php b/lib/private/search/result/file.php
index 0ecbc0ba1fa..32a4aebc700 100644
--- a/lib/private/search/result/file.php
+++ b/lib/private/search/result/file.php
@@ -18,7 +18,7 @@
*/
namespace OC\Search\Result;
-
+use \OC\Files\Filesystem;
/**
* A found file
*/
@@ -63,9 +63,6 @@ class File extends \OC\Search\Result {
/**
* Create a new file search result
- * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]'
- * @param string $name displayed text of result
- * @param string $link URL to the result within its app
* @param array $data file data given by provider
*/
public function __construct(array $data = null) {
@@ -96,15 +93,15 @@ class File extends \OC\Search\Result {
$fileinfo = pathinfo($path);
$dir = $fileinfo['dirname'] . '/';
// add update permissions
- if (\OC_Filesystem::isUpdatable($dir)) {
+ if (Filesystem::isUpdatable($dir)) {
$permissions |= \OCP\PERMISSION_UPDATE;
}
// add delete permissions
- if (\OC_Filesystem::isDeletable($dir)) {
+ if (Filesystem::isDeletable($dir)) {
$permissions |= \OCP\PERMISSION_DELETE;
}
// add share permissions
- if (\OC_Filesystem::isSharable($dir)) {
+ if (Filesystem::isSharable($dir)) {
$permissions |= \OCP\PERMISSION_SHARE;
}
// return
diff --git a/lib/private/search/result/folder.php b/lib/private/search/result/folder.php
index 8346f933b4d..29469a1d112 100644
--- a/lib/private/search/result/folder.php
+++ b/lib/private/search/result/folder.php
@@ -22,7 +22,7 @@ namespace OC\Search\Result;
/**
* A found folder
*/
-class Folder extends \OC\Search\Result\File {
+class Folder extends File {
/**
* Type name; translated in templates
diff --git a/lib/private/search/result/image.php b/lib/private/search/result/image.php
index ecc706fffe6..f4e6be56c8d 100644
--- a/lib/private/search/result/image.php
+++ b/lib/private/search/result/image.php
@@ -22,7 +22,7 @@ namespace OC\Search\Result;
/**
* A found image file
*/
-class Image extends \OC\Search\Result\File {
+class Image extends File {
/**
* Type name; translated in templates