diff options
author | Louis Chemineau <louis@chmn.me> | 2022-06-23 17:32:52 +0300 |
---|---|---|
committer | Louis (Rebase PR Action) <artonge@users.noreply.github.com> | 2022-07-26 15:17:46 +0300 |
commit | f52506793083d44674586257eadb230d02b15bba (patch) | |
tree | e35095be933f48a86d43a86cb48175c645c3bf00 /lib/public | |
parent | 256ed34b7e4a3b151f7d94c5be22628e4872757a (diff) |
Add argument to getSharesInFolder enable deep share lookup
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Share/IManager.php | 11 | ||||
-rw-r--r-- | lib/public/Share/IShareProvider.php | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index b1c980733fb..0810acc673a 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -135,18 +135,11 @@ interface IManager { * @param string $userId * @param Folder $node * @param bool $reshares + * @param bool $shallow Whether the method should stop at the first level, or look into sub-folders. * @return IShare[][] [$fileId => IShare[], ...] * @since 11.0.0 */ - public function getSharesInFolder($userId, Folder $node, $reshares = false); - - /** - * Recursively get all shares shared by (initiated) by the provided user in a folder. - * - * @return IShare[][] [$fileId => IShare[], ...] - * @since 11.0.0 - */ - public function getSharesInFolderRecursive(string $userId, Folder $node, bool $reshares = false); + public function getSharesInFolder($userId, Folder $node, $reshares = false, $shallow = true); /** * Get shares shared by (initiated) by the provided user. diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index 6af513360fe..c549592d6f6 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -123,10 +123,11 @@ interface IShareProvider { * @param string $userId * @param Folder $node * @param bool $reshares Also get the shares where $user is the owner instead of just the shares where $user is the initiator + * @param bool $shallow Whether the method should stop at the first level, or look into sub-folders. * @return \OCP\Share\IShare[][] * @since 11.0.0 */ - public function getSharesInFolder($userId, Folder $node, $reshares); + public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true); /** * Get all shares by the given user |