@@ -321,7 +321,8 @@ protected function createMailShare(IShare $share) {
321321 $ share ->getToken (),
322322 $ share ->getPassword (),
323323 $ share ->getSendPasswordByTalk (),
324- $ share ->getHideDownload ()
324+ $ share ->getHideDownload (),
325+ $ share ->getExpirationDate ()
325326 );
326327
327328 try {
@@ -658,9 +659,10 @@ public function getChildren(IShare $parent) {
658659 * @param string $password
659660 * @param bool $sendPasswordByTalk
660661 * @param bool $hideDownload
662+ * @param \DateTime|null $expirationTime
661663 * @return int
662664 */
663- protected function addShareToDB ($ itemSource , $ itemType , $ shareWith , $ sharedBy , $ uidOwner , $ permissions , $ token , $ password , $ sendPasswordByTalk , $ hideDownload ) {
665+ protected function addShareToDB ($ itemSource , $ itemType , $ shareWith , $ sharedBy , $ uidOwner , $ permissions , $ token , $ password , $ sendPasswordByTalk , $ hideDownload, $ expirationTime ) {
664666 $ qb = $ this ->dbConnection ->getQueryBuilder ();
665667 $ qb ->insert ('share ' )
666668 ->setValue ('share_type ' , $ qb ->createNamedParameter (IShare::TYPE_EMAIL ))
@@ -677,6 +679,10 @@ protected function addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $
677679 ->setValue ('stime ' , $ qb ->createNamedParameter (time ()))
678680 ->setValue ('hide_download ' , $ qb ->createNamedParameter ((int )$ hideDownload , IQueryBuilder::PARAM_INT ));
679681
682+ if ($ expirationTime !== null ) {
683+ $ qb ->setValue ('expiration ' , $ qb ->createNamedParameter ($ expirationTime , IQueryBuilder::PARAM_DATE ));
684+ }
685+
680686 /*
681687 * Added to fix https://github.com/owncloud/core/issues/22215
682688 * Can be removed once we get rid of ajax/share.php
0 commit comments