Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-06-02 12:23:22 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-08-03 14:24:19 +0300
commit4b1649fbf3549c5e9d65f5f6221b175b9f1d99f1 (patch)
treeb5c571d89f3bf0b9f37a8371641231e894bc4964 /apps
parent9e59a6a73117ca458d92dced49d797c12496e9d7 (diff)
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>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php8
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 43e2d309a92..e8bcf1efc3c 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);