summaryrefslogtreecommitdiffstats
path: root/lib/public/share.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-02 07:58:06 +0200
committerkondou <kondou@ts.unde.re>2013-09-02 07:58:06 +0200
commite5fc7b9dbeb01ac116bb132903c562c8f7d3c5b3 (patch)
treeb7d8d913cdf7f4d1ce42f3027918ad0f5fbe5c3b /lib/public/share.php
parent8dd93c8c0288a11f04816bea2a58aee661ef9e97 (diff)
parentf038cb9aea7c9a1513ab14d0df002773b17d5333 (diff)
downloadnextcloud-server-e5fc7b9dbeb01ac116bb132903c562c8f7d3c5b3.tar.gz
nextcloud-server-e5fc7b9dbeb01ac116bb132903c562c8f7d3c5b3.zip
Merge branch 'master' into clean_up_util
Conflicts: lib/base.php
Diffstat (limited to 'lib/public/share.php')
-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 7714837769d..fe996dbe266 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) {