diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-22 00:18:14 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-22 00:18:14 +0200 |
commit | fbc23c4a01e8d900fb057393a6ffaba77ab35ddc (patch) | |
tree | 94cd1d9153f88fc9f15eca6c49d9b189cb38a29f | |
parent | f1eec74f7048e41a876f1c757c6b953097e69872 (diff) | |
parent | 958130e8fef633cf7ee0bdca771bbb9205e337d7 (diff) | |
download | nextcloud-server-fbc23c4a01e8d900fb057393a6ffaba77ab35ddc.tar.gz nextcloud-server-fbc23c4a01e8d900fb057393a6ffaba77ab35ddc.zip |
Merge branch 'master' of github.com:owncloud/core
-rw-r--r-- | apps/user_ldap/lib/jobs.php | 2 | ||||
-rw-r--r-- | lib/public/share.php | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/jobs.php b/apps/user_ldap/lib/jobs.php index d626afed6c3..6b7666d4ca1 100644 --- a/apps/user_ldap/lib/jobs.php +++ b/apps/user_ldap/lib/jobs.php @@ -82,7 +82,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob { $hasChanged = true; } foreach(array_diff($actualUsers, $knownUsers) as $addedUser) { - \OCP\Util::emitHook('OC_User', 'post_addFromGroup', array('uid' => $addedUser, 'gid' => $group)); + \OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group)); \OCP\Util::writeLog('user_ldap', 'bgJ "updateGroups" – "'.$addedUser.'" added to "'.$group.'".', \OCP\Util::INFO); diff --git a/lib/public/share.php b/lib/public/share.php index 63645e6fa34..b38208bc67f 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -209,7 +209,7 @@ class Share { } } } - + // let's get the parent for the next round $meta = $cache->get((int)$source); if($meta !== false) { @@ -840,7 +840,11 @@ class Share { // Get filesystem root to add it to the file target and remove from the // file source, match file_source with the file cache if ($itemType == 'file' || $itemType == 'folder') { - $root = \OC\Files\Filesystem::getRoot(); + if(!is_null($uidOwner)) { + $root = \OC\Files\Filesystem::getRoot(); + } else { + $root = ''; + } $where = 'INNER JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid`'; if (!isset($item)) { $where .= ' WHERE `file_target` IS NOT NULL'; @@ -1303,11 +1307,11 @@ class Share { 'run' => &$run, 'error' => &$error )); - + if ($run === false) { throw new \Exception($error); } - + if (isset($fileSource)) { if ($parentFolder) { if ($parentFolder === true) { @@ -1398,11 +1402,11 @@ class Share { 'run' => &$run, 'error' => &$error )); - + if ($run === false) { throw new \Exception($error); } - + if (isset($fileSource)) { if ($parentFolder) { if ($parentFolder === true) { |