Unify share type sorting when getting shares of a file or with subfiles

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2019-10-25 10:20:32 +02:00
parent 0599536c82
commit 24febe1e41
2 changed files with 2 additions and 2 deletions

View File

@ -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 = [];

View File

@ -1288,8 +1288,8 @@ class ShareAPIControllerTest extends TestCase {
$file1GroupShareOwnerExpected,
$file1LinkShareOwnerExpected,
$file1EmailShareOwnerExpected,
$file1RemoteShareOwnerExpected,
$file1RoomShareOwnerExpected,
$file1RemoteShareOwnerExpected,
]
],
];