Merge pull request #17327 from owncloud/fix_index
owner is stored as 'uid_owner', not as 'owner' in the oc_share table
This commit is contained in:
commit
fd8f6a18fd
|
@ -150,6 +150,8 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
});
|
});
|
||||||
$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
|
$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()));
|
\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;
|
return $groupManager;
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,12 +63,12 @@ class Hooks extends \OC\Share\Constants {
|
||||||
$itemTarget = $sourceExists['item_target'];
|
$itemTarget = $sourceExists['item_target'];
|
||||||
} else {
|
} else {
|
||||||
$itemTarget = Helper::generateTarget($item['item_type'], $item['item_source'], self::SHARE_TYPE_USER, $arguments['uid'],
|
$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
|
// do we also need a file target
|
||||||
if ($item['item_type'] === 'file' || $item['item_type'] === 'folder') {
|
if ($item['item_type'] === 'file' || $item['item_type'] === 'folder') {
|
||||||
$fileTarget = Helper::generateTarget('file', $item['file_target'], self::SHARE_TYPE_USER, $arguments['uid'],
|
$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 {
|
} else {
|
||||||
$fileTarget = null;
|
$fileTarget = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue