summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-02 23:26:28 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-02 23:26:28 +0200
commitfd8f6a18fd527793f836f9be57c10626f741a37d (patch)
treee5bc109186e3bda7b4dc2e2fd59c25b761bfda53
parentded2b2b69050ce2b1cfbb357245de245c13eadf3 (diff)
parentf5a7aa296869689713875881cb6c4db44184f6d1 (diff)
downloadnextcloud-server-fd8f6a18fd527793f836f9be57c10626f741a37d.tar.gz
nextcloud-server-fd8f6a18fd527793f836f9be57c10626f741a37d.zip
Merge pull request #17327 from owncloud/fix_index
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;
}