summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-12-23 14:36:05 +0100
committerGitHub <noreply@github.com>2016-12-23 14:36:05 +0100
commit886341aca4951d4b5d3ea846d09c45cd0858fb57 (patch)
tree547fc031fb5177b0a8139154a6b681384f481512
parentc5cc0d87a86725e03b74d0c7377a7e4d7dab846b (diff)
parent928f11336160ce9f25ad21e891169502b050a65c (diff)
downloadnextcloud-server-886341aca4951d4b5d3ea846d09c45cd0858fb57.tar.gz
nextcloud-server-886341aca4951d4b5d3ea846d09c45cd0858fb57.zip
Merge pull request #2816 from nextcloud/changing_how_favorites_are_serialized
Return explicit values instead of boolean from sabre (#26654)
-rw-r--r--apps/dav/lib/Connector/Sabre/TagsPlugin.php6
-rw-r--r--build/integration/features/favorites.feature8
2 files changed, 9 insertions, 5 deletions
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index ef6bece58bc..59e4ab4546d 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -250,7 +250,11 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
if (is_null($isFav)) {
list(, $isFav) = $this->getTagsAndFav($node->getId());
}
- return $isFav;
+ if ($isFav) {
+ return 1;
+ } else {
+ return 0;
+ }
});
}
diff --git a/build/integration/features/favorites.feature b/build/integration/features/favorites.feature
index ab6bf51f25c..9722948dac2 100644
--- a/build/integration/features/favorites.feature
+++ b/build/integration/features/favorites.feature
@@ -19,7 +19,7 @@ Feature: favorite
And user "user0" unfavorites element "/FOLDER"
Then as "user0" gets properties of folder "/FOLDER" with
|{http://owncloud.org/ns}favorite|
- And the single response should contain a property "{http://owncloud.org/ns}favorite" with value ""
+ And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
Scenario: Favorite a file
Given using old dav path
@@ -38,7 +38,7 @@ Feature: favorite
And user "user0" unfavorites element "/textfile0.txt"
Then as "user0" gets properties of file "/textfile0.txt" with
|{http://owncloud.org/ns}favorite|
- And the single response should contain a property "{http://owncloud.org/ns}favorite" with value ""
+ And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
Scenario: Favorite a folder new endpoint
Given using new dav path
@@ -57,7 +57,7 @@ Feature: favorite
And user "user0" unfavorites element "/FOLDER"
Then as "user0" gets properties of folder "/FOLDER" with
|{http://owncloud.org/ns}favorite|
- And the single response should contain a property "{http://owncloud.org/ns}favorite" with value ""
+ And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
Scenario: Favorite a file new endpoint
Given using new dav path
@@ -76,7 +76,7 @@ Feature: favorite
And user "user0" unfavorites element "/textfile0.txt"
Then as "user0" gets properties of file "/textfile0.txt" with
|{http://owncloud.org/ns}favorite|
- And the single response should contain a property "{http://owncloud.org/ns}favorite" with value ""
+ And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
Scenario: Get favorited elements of a folder
Given using old dav path