diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 759b19060c23b..373ea797a086f 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -620,8 +620,8 @@ public function createShare( if ($expireDate !== null) { if ($expireDate !== '') { try { - $expireDate = $this->parseDate($expireDate); - $share->setExpirationDate($expireDate); + $expireDateTime = $this->parseDate($expireDate); + $share->setExpirationDate($expireDateTime); } catch (\Exception $e) { throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD')); } @@ -718,10 +718,6 @@ 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()) { @@ -734,10 +730,6 @@ 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'));