diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-04 10:39:13 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-11 10:11:48 +0200 |
commit | 3942d731d21e6369c395358699a9561519992069 (patch) | |
tree | 0f310ce8856af82c1f279a1e1e6f323cba9f1483 /apps/files_sharing/lib/External | |
parent | 5b06a7d773d303a9b01c98eb714fd1829129646f (diff) | |
download | nextcloud-server-3942d731d21e6369c395358699a9561519992069.tar.gz nextcloud-server-3942d731d21e6369c395358699a9561519992069.zip |
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files_sharing/lib/External')
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 9f8acbce4cb..a3b037e4982 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -276,15 +276,16 @@ class Manager { $mountPoint = Files::buildNotExistingFileName($shareFolder, $share['name']); $mountPoint = Filesystem::normalizePath($mountPoint); $hash = md5($mountPoint); + $userShareAccepted = false; - if($share['share_type'] === Share::SHARE_TYPE_USER) { + if((int)$share['share_type'] === Share::SHARE_TYPE_USER) { $acceptShare = $this->connection->prepare(' UPDATE `*PREFIX*share_external` SET `accepted` = ?, `mountpoint` = ?, `mountpoint_hash` = ? WHERE `id` = ? AND `user` = ?'); - $updated = $acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid)); + $userShareAccepted = $acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid)); } else { $result = $this->writeShareToDb( $share['remote'], @@ -297,9 +298,8 @@ class Manager { $share['remote_id'], $id, $share['share_type']); - // TODO group share, add additional row for the user who accepted it } - if ($updated === true) { + if ($userShareAccepted === true) { $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept'); \OC_Hook::emit(Share::class, 'federated_share_added', ['server' => $share['remote']]); $result = true; |