summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-10-13 10:53:04 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-12-02 00:59:31 +0100
commita05bdcf1df78a41df546f5939c3e921f087fda13 (patch)
tree3ccf3ea611f66402a3e1ad24e965aab6c185aad4 /lib
parent5fc4d454098932f0e1dc7bd6a4415144e71e660f (diff)
downloadnextcloud-server-a05bdcf1df78a41df546f5939c3e921f087fda13.tar.gz
nextcloud-server-a05bdcf1df78a41df546f5939c3e921f087fda13.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 1dc685190b6..d5ce1e92e50 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -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;
}