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:
Morris Jobke 2015-07-02 23:26:28 +02:00
commit fd8f6a18fd
2 changed files with 4 additions and 2 deletions

View File

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

View File

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