diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-06-02 11:23:22 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-28 16:53:23 +0200 |
commit | 54a0d8fe646fd01550423e6c91c272444dce6112 (patch) | |
tree | 4b3f6df53b769009c3cdd90e68e727cf180a12a4 | |
parent | dbbc426f754df9b39b95f182103e914b3348ff20 (diff) | |
download | nextcloud-server-54a0d8fe646fd01550423e6c91c272444dce6112.tar.gz nextcloud-server-54a0d8fe646fd01550423e6c91c272444dce6112.zip |
Don't reset share attributes when not specified
When not specified in the OCS call, don't reset the share attributes.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 6b43e0f9dcf..889428db99a 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -681,7 +681,9 @@ class ShareAPIController extends OCSController { $share->setNote($note); } - $share = $this->setShareAttributes($share, $attributes); + if ($attributes !== null) { + $share = $this->setShareAttributes($share, $attributes); + } try { $share = $this->shareManager->createShare($share); @@ -1228,7 +1230,9 @@ class ShareAPIController extends OCSController { } } - $share = $this->setShareAttributes($share, $attributes); + if ($attributes !== null) { + $share = $this->setShareAttributes($share, $attributes); + } try { $share = $this->shareManager->updateShare($share); |