diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-28 14:29:04 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-05-04 10:47:13 +0200 |
commit | 45a36feec68cc7530ad84521ef7c22b0536c2d3a (patch) | |
tree | 18d54906e16c22015680683e1b6f71c8e91c5f5f | |
parent | 92ae7c284b66840b4ede7ff7821b4224968924f4 (diff) | |
download | nextcloud-server-45a36feec68cc7530ad84521ef7c22b0536c2d3a.tar.gz nextcloud-server-45a36feec68cc7530ad84521ef7c22b0536c2d3a.zip |
Correctly send Federate-Cloud Share Feedback against the remote share ID
-rw-r--r-- | apps/files_sharing/lib/external/manager.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php index 860554a35d8..aef7654d382 100644 --- a/apps/files_sharing/lib/external/manager.php +++ b/apps/files_sharing/lib/external/manager.php @@ -156,7 +156,7 @@ class Manager { */ private function getShare($id) { $getShare = $this->connection->prepare(' - SELECT `remote`, `share_token`, `name` + SELECT `remote`, `remote_id`, `share_token`, `name` FROM `*PREFIX*share_external` WHERE `id` = ? AND `user` = ?'); $result = $getShare->execute(array($id, $this->uid)); @@ -185,7 +185,7 @@ class Manager { `mountpoint_hash` = ? WHERE `id` = ? AND `user` = ?'); $acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid)); - $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $id, 'accept'); + $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept'); } } @@ -202,7 +202,7 @@ class Manager { $removeShare = $this->connection->prepare(' DELETE FROM `*PREFIX*share_external` WHERE `id` = ? AND `user` = ?'); $removeShare->execute(array($id, $this->uid)); - $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $id, 'decline'); + $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline'); } } @@ -211,13 +211,13 @@ class Manager { * * @param string $remote * @param string $token - * @param int $id + * @param int $remoteId Share id on the remote host * @param string $feedback * @return boolean */ - private function sendFeedbackToRemote($remote, $token, $id, $feedback) { + private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) { - $url = rtrim($remote, '/') . \OCP\Share::BASE_PATH_TO_SHARE_API . '/' . $id . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT; + $url = rtrim($remote, '/') . \OCP\Share::BASE_PATH_TO_SHARE_API . '/' . $remoteId . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT; $fields = array('token' => $token); $result = $this->httpHelper->post($url, $fields); |