Skip to content

Commit

Permalink
fix(shareApiController): avoid duplicated expiryDate operations
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
nfebe committed Jun 10, 2024
1 parent 01e35a9 commit c247700
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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'));
Expand Down

0 comments on commit c247700

Please sign in to comment.