Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-10-13 11:53:04 +0300
committerVincent Petry <pvince81@owncloud.com>2016-10-17 10:49:13 +0300
commitfcda88ccb14d2bc75905138406bb15100e3c9585 (patch)
treed8f81c1e866cd04d5881682a43b9864ace487ef4 /lib
parent97d12db75be84db1986b7a59a47cb083e2aa20ad (diff)
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 3804d656dba..7598b400127 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;
}