diff options
author | kondou <kondou@ts.unde.re> | 2013-09-02 07:58:06 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-02 07:58:06 +0200 |
commit | e5fc7b9dbeb01ac116bb132903c562c8f7d3c5b3 (patch) | |
tree | b7d8d913cdf7f4d1ce42f3027918ad0f5fbe5c3b /lib/public/share.php | |
parent | 8dd93c8c0288a11f04816bea2a58aee661ef9e97 (diff) | |
parent | f038cb9aea7c9a1513ab14d0df002773b17d5333 (diff) | |
download | nextcloud-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.php | 16 |
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) { |