diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-25 10:20:32 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-25 21:39:49 +0200 |
commit | 24febe1e4145e8446ff8572fe84d78495c45ed38 (patch) | |
tree | 0fc90be73762fe7a9aba2f441af2e8384565aa18 /apps/files_sharing | |
parent | 0599536c823eeea76217036a41a891345ff39c28 (diff) | |
download | nextcloud-server-24febe1e4145e8446ff8572fe84d78495c45ed38.tar.gz nextcloud-server-24febe1e4145e8446ff8572fe84d78495c45ed38.zip |
Unify share type sorting when getting shares of a file or with subfiles
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareAPIControllerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 04eb8225fbc..8b5ad12ae52 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -629,10 +629,10 @@ class ShareAPIController extends OCSController { $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_GROUP, $node, true, -1, 0)); $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_LINK, $node, true, -1, 0)); $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_EMAIL, $node, true, -1, 0)); + $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_ROOM, $node, true, -1, 0)); if ($this->shareManager->outgoingServer2ServerSharesAllowed()) { $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_REMOTE, $node, true, -1, 0)); } - $shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, Share::SHARE_TYPE_ROOM, $node, true, -1, 0)); } $formatted = $miniFormatted = []; diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index fd6aed09a9f..3e0dc29fe95 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -1288,8 +1288,8 @@ class ShareAPIControllerTest extends TestCase { $file1GroupShareOwnerExpected, $file1LinkShareOwnerExpected, $file1EmailShareOwnerExpected, - $file1RemoteShareOwnerExpected, $file1RoomShareOwnerExpected, + $file1RemoteShareOwnerExpected, ] ], ]; |