From c247700d722a3f3449ec4a070dc96e2979fbfab9 Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Mon, 15 Apr 2024 21:38:55 +0100 Subject: [PATCH] fix(shareApiController): avoid duplicated expiryDate operations `expireDate` can be set once and used anywhere needed, the current implementation, duplicates this behavior which leads to `parseDate` receiving an a date object it parsed and returend earlier in the createShare method. Signed-off-by: fenn-cs --- apps/files_sharing/lib/Controller/ShareAPIController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 8f90195fe9602..759b19060c23b 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -718,7 +718,10 @@ public function createShare( $share->setSharedWith($shareWith); $share->setPermissions($permissions); +<<<<<<< HEAD +======= +>>>>>>> ec8a0a6267d (fix(shareApiController): avoid duplicated expiryDate operations) $share->setSharedWithDisplayName($this->getCachedFederatedDisplayName($shareWith, false)); } elseif ($shareType === IShare::TYPE_REMOTE_GROUP) { if (!$this->shareManager->outgoingServer2ServerGroupSharesAllowed()) { @@ -731,7 +734,10 @@ public function createShare( $share->setSharedWith($shareWith); $share->setPermissions($permissions); +<<<<<<< HEAD +======= +>>>>>>> ec8a0a6267d (fix(shareApiController): avoid duplicated expiryDate operations) } elseif ($shareType === IShare::TYPE_CIRCLE) { if (!\OC::$server->getAppManager()->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) { throw new OCSNotFoundException($this->l->t('You cannot share to a Circle if the app is not enabled'));