aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-08 10:32:30 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-08 10:32:30 +0200
commit97e49e422f3024ce052f767cdbe917315f7eee6c (patch)
tree2a73bffe3eeb7feae558834f7caab6765b44b4c5
parent5d3d44eeb9aa2d27ed2541c3c41d231dba22642e (diff)
parent9def2fcf7142a780e14abd86b51321491d919fdf (diff)
downloadnextcloud-server-97e49e422f3024ce052f767cdbe917315f7eee6c.tar.gz
nextcloud-server-97e49e422f3024ce052f767cdbe917315f7eee6c.zip
Merge pull request #17366 from owncloud/fix_16740_8.1
[oc8.1] owner is stored as 'uid_owner', not as 'owner' in the oc_share table
-rw-r--r--lib/private/server.php2
-rw-r--r--lib/private/share/hooks.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 6a65895cd69..c08940bb756 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -150,6 +150,8 @@ class Server extends SimpleContainer implements IServerContainer {
});
$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
+ //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
+ \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
});
return $groupManager;
});
diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php
index 6eff4cc246f..b0d4f0677f5 100644
--- a/lib/private/share/hooks.php
+++ b/lib/private/share/hooks.php
@@ -63,12 +63,12 @@ class Hooks extends \OC\Share\Constants {
$itemTarget = $sourceExists['item_target'];
} else {
$itemTarget = Helper::generateTarget($item['item_type'], $item['item_source'], self::SHARE_TYPE_USER, $arguments['uid'],
- $item['owner'], null, $item['parent']);
+ $item['uid_owner'], null, $item['parent']);
// do we also need a file target
if ($item['item_type'] === 'file' || $item['item_type'] === 'folder') {
$fileTarget = Helper::generateTarget('file', $item['file_target'], self::SHARE_TYPE_USER, $arguments['uid'],
- $item['owner'], null, $item['parent']);
+ $item['uid_owner'], null, $item['parent']);
} else {
$fileTarget = null;
}