Browse Source

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>
pull/32482/head
Vincent Petry 4 years ago
committed by Carl Schwan
parent
commit
54a0d8fe64
No known key found for this signature in database GPG Key ID: C3AA6B3A5EFA7AC5
  1. 8
      apps/files_sharing/lib/Controller/ShareAPIController.php

8
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);

Loading…
Cancel
Save