mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Fix group post_shared hook
This commit is contained in:
parent
e466d680fe
commit
ee0c38bb51
1 changed files with 14 additions and 14 deletions
|
|
@ -1103,20 +1103,6 @@ class Share {
|
|||
} else {
|
||||
$fileTarget = null;
|
||||
}
|
||||
\OC_Hook::emit('OCP\Share', 'post_shared', array(
|
||||
'itemType' => $itemType,
|
||||
'itemSource' => $itemSource,
|
||||
'itemTarget' => $itemTarget,
|
||||
'parent' => $parent,
|
||||
'shareType' => self::$shareTypeGroupUserUnique,
|
||||
'shareWith' => $uid,
|
||||
'uidOwner' => $uidOwner,
|
||||
'permissions' => $permissions,
|
||||
'fileSource' => $fileSource,
|
||||
'fileTarget' => $fileTarget,
|
||||
'id' => $parent,
|
||||
'token' => $token
|
||||
));
|
||||
// Insert an extra row for the group share if the item or file target is unique for this user
|
||||
if ($itemTarget != $groupItemTarget || (isset($fileSource) && $fileTarget != $groupFileTarget)) {
|
||||
$query->execute(array($itemType, $itemSource, $itemTarget, $parent,
|
||||
|
|
@ -1125,6 +1111,20 @@ class Share {
|
|||
$id = \OC_DB::insertid('*PREFIX*share');
|
||||
}
|
||||
}
|
||||
\OC_Hook::emit('OCP\Share', 'post_shared', array(
|
||||
'itemType' => $itemType,
|
||||
'itemSource' => $itemSource,
|
||||
'itemTarget' => $groupItemTarget,
|
||||
'parent' => $parent,
|
||||
'shareType' => $shareType,
|
||||
'shareWith' => $uid,
|
||||
'uidOwner' => $uidOwner,
|
||||
'permissions' => $permissions,
|
||||
'fileSource' => $fileSource,
|
||||
'fileTarget' => $groupFileTarget,
|
||||
'id' => $parent,
|
||||
'token' => $token
|
||||
));
|
||||
if ($parentFolder === true) {
|
||||
// Return parent folders to preserve file target paths for potential children
|
||||
return $parentFolders;
|
||||
|
|
|
|||
Loading…
Reference in a new issue