summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Files
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-02-21 18:18:41 +0100
committerRobin Appelman <robin@icewind.nl>2017-03-01 14:06:40 +0100
commit709f64d39699331f197dd2d93b9d62980a2ba145 (patch)
treeb8f9a724eb73425e4bfe89c477f9c9fdb0864665 /apps/dav/lib/Files
parente6a896f2f076507c33a02962035b29afb24dad05 (diff)
downloadnextcloud-server-709f64d39699331f197dd2d93b9d62980a2ba145.tar.gz
nextcloud-server-709f64d39699331f197dd2d93b9d62980a2ba145.zip
add tests for filesearchbackend
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib/Files')
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index 3d87612aad7..c429a1727f8 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -130,6 +130,10 @@ class FileSearchBackend implements ISearchBackend {
];
}
+ /**
+ * @param BasicSearch $search
+ * @return SearchResult[]
+ */
public function search(BasicSearch $search) {
if (count($search->from) !== 1) {
throw new \InvalidArgumentException('Searching more than one folder is not supported');
@@ -225,13 +229,6 @@ class FileSearchBackend implements ISearchBackend {
* @return string
*/
private function mapPropertyNameToCollumn($propertyName) {
- /**
- * new SearchPropertyDefinition('{DAV:}displayname', true, false, true),
- * new SearchPropertyDefinition('{DAV:}getcontenttype', true, true, true),
- * new SearchPropertyDefinition('{DAV:}getlastmodifed', true, true, true, SearchPropertyDefinition::DATATYPE_DATETIME),
- * new SearchPropertyDefinition(FilesPlugin::SIZE_PROPERTYNAME, true, true, true, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
- */
-
switch ($propertyName) {
case '{DAV:}displayname':
return 'name';