aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-03-19 17:02:40 +0100
committerRobin Appelman <robin@icewind.nl>2025-03-28 16:47:10 +0100
commitb9723eaa2253663a9f8965dd600a5227e37b83d3 (patch)
treedffe66bbf472952ca5d27ba25a92810b4d2ddce2
parent9626c08786cd0f41200793f4a1fe05b06f73e64c (diff)
downloadnextcloud-server-share-list-cmd.tar.gz
nextcloud-server-share-list-cmd.zip
feat: remove share status from share:list as it doesn't seem to contain usefull info at the momentshare-list-cmd
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--apps/files_sharing/lib/Command/ListShares.php19
1 files changed, 0 insertions, 19 deletions
diff --git a/apps/files_sharing/lib/Command/ListShares.php b/apps/files_sharing/lib/Command/ListShares.php
index 98bfc721ec8..2d5cdbf7812 100644
--- a/apps/files_sharing/lib/Command/ListShares.php
+++ b/apps/files_sharing/lib/Command/ListShares.php
@@ -34,12 +34,6 @@ class ListShares extends Base {
IShare::TYPE_DECK => 'deck',
];
- private const SHARE_STATUS_NAMES = [
- IShare::STATUS_PENDING => 'pending',
- IShare::STATUS_ACCEPTED => 'accepted',
- IShare::STATUS_REJECTED => 'rejected',
- ];
-
public function __construct(
private readonly IManager $shareManager,
private readonly IRootFolder $rootFolder,
@@ -85,7 +79,6 @@ class ListShares extends Base {
'recipient' => $share->getSharedWith(),
'by' => $share->getSharedBy(),
'type' => self::SHARE_TYPE_NAMES[$share->getShareType()] ?? 'unknown',
- 'status' => self::SHARE_STATUS_NAMES[$share->getStatus()] ?? 'unknown',
];
}, $shares);
@@ -126,15 +119,6 @@ class ListShares extends Base {
throw new \Exception("Unknown share type $type");
}
- private function getShareStatus(string $status): int {
- foreach (self::SHARE_STATUS_NAMES as $shareStatus => $shareStatusName) {
- if ($shareStatusName === $status) {
- return $shareStatus;
- }
- }
- throw new \Exception("Unknown share status $status");
- }
-
private function shouldShowShare(InputInterface $input, IShare $share): bool {
if ($input->getOption('owner') && $share->getShareOwner() !== $input->getOption('owner')) {
return false;
@@ -172,9 +156,6 @@ class ListShares extends Base {
if ($input->getOption('type') && $share->getShareType() !== $this->getShareType($input->getOption('type'))) {
return false;
}
- if ($input->getOption('status') && $share->getStatus() !== $this->getShareStatus($input->getOption('status'))) {
- return false;
- }
return true;
}
}