Fix post_unshareFromSelf hook parameter format
When unsharing from self in a group share situation, the share items passed to the post_unshareFromSelf hook were using the wrong format in which the attribute names (ex: "share_type") have non camel-case format. This fix makes sure that in group sharing case we use the correct format. It looks like the code was already producing it but in array_merge it was not using it and adding the unprocessed one.
This commit is contained in:
parent
5fc4d45409
commit
a05bdcf1df
|
@ -1042,7 +1042,7 @@ class Share extends Constants {
|
|||
if (isset($groupShare['file_target'])) {
|
||||
$shareTmp['fileTarget'] = $groupShare['file_target'];
|
||||
}
|
||||
$listOfUnsharedItems = array_merge($listOfUnsharedItems, array($groupShare));
|
||||
$listOfUnsharedItems = array_merge($listOfUnsharedItems, array($shareTmp));
|
||||
$itemUnshared = true;
|
||||
} elseif (!$itemUnshared && isset($uniqueGroupShare)) {
|
||||
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `permissions` = ? WHERE `id` = ?');
|
||||
|
@ -1057,7 +1057,7 @@ class Share extends Constants {
|
|||
if (isset($uniqueGroupShare['file_target'])) {
|
||||
$shareTmp['fileTarget'] = $uniqueGroupShare['file_target'];
|
||||
}
|
||||
$listOfUnsharedItems = array_merge($listOfUnsharedItems, array($uniqueGroupShare));
|
||||
$listOfUnsharedItems = array_merge($listOfUnsharedItems, array($shareTmp));
|
||||
$itemUnshared = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue