summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2013-08-23 23:10:37 +0200
committerGeorg Ehrke <developer@georgehrke.com>2013-08-23 23:10:37 +0200
commit6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d (patch)
treeb564539f21866e6049d69da6d011647ff46540f7 /lib/public
parent1dab0767502013b5e86e8e24e3b12a2a8939f7a8 (diff)
parent02b2b5a808b135007d8d54b837e70c38f02729fd (diff)
downloadnextcloud-server-6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d.tar.gz
nextcloud-server-6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d.zip
Merge branch 'master' into oc_preview
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php16
1 files changed, 10 insertions, 6 deletions
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) {