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:
Vincent Petry 2016-10-13 10:53:04 +02:00 committed by Morris Jobke
parent 5fc4d45409
commit a05bdcf1df
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}