mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
Update the target when it isempty after sharing
Hooks that listen to it (audit log) benefit from having the target properly set. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6e2b7d5167
commit
b0808d06ef
1 changed files with 5 additions and 0 deletions
|
|
@ -697,6 +697,11 @@ class Manager implements IManager {
|
|||
//reuse the node we already have
|
||||
$share->setNode($oldShare->getNode());
|
||||
|
||||
// Reset the target if it is null for the new share
|
||||
if ($share->getTarget() === '') {
|
||||
$share->setTarget($target);
|
||||
}
|
||||
|
||||
// Post share event
|
||||
$event = new GenericEvent($share);
|
||||
$this->eventDispatcher->dispatch('OCP\Share::postShare', $event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue