summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib/Notifications.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2016-05-13 20:36:42 +0200
committerBjörn Schießle <schiessle@owncloud.com>2016-05-20 21:15:15 +0200
commit2dc26aada7977ad1416d6ac9797355807ab3d190 (patch)
tree3e1736f946f881d631857a190b76ac4a969dd73c /apps/federatedfilesharing/lib/Notifications.php
parent7b25839bd51b3b6cd920209c254f014c03437113 (diff)
downloadnextcloud-server-2dc26aada7977ad1416d6ac9797355807ab3d190.tar.gz
nextcloud-server-2dc26aada7977ad1416d6ac9797355807ab3d190.zip
update share permissions
Diffstat (limited to 'apps/federatedfilesharing/lib/Notifications.php')
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index c65da212aad..ef59d0a5fdc 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -183,7 +183,7 @@ class Notifications {
* @return bool
*/
public function sendPermissionChange($remote, $remoteId, $token, $permissions) {
- $this->sendUpdateToRemote($remote, $remoteId, $token, ['permissions' => $permissions]);
+ $this->sendUpdateToRemote($remote, $remoteId, $token, 'permissions', ['permissions' => $permissions]);
}
/**
@@ -222,6 +222,10 @@ class Notifications {
public function sendUpdateToRemote($remote, $remoteId, $token, $action, $data = [], $try = 0) {
$fields = array('token' => $token);
+ foreach ($data as $key => $value) {
+ $fields[$key] = $value;
+ }
+
$url = $this->addressHandler->removeProtocolFromUrl($remote);
$result = $this->tryHttpPostToShareEndpoint(rtrim($url, '/'), '/' . $remoteId . '/' . $action, $fields);
$status = json_decode($result['result'], true);