diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-13 14:49:16 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-13 15:04:54 +0200 |
commit | c6c9a51b111acbec51b6dcbaa3cba7497631a2ab (patch) | |
tree | c4704eaec59a665365d2347fddc9f0436330109a | |
parent | 4b9465b937a7754d2b58a77cf8f12adeaccef993 (diff) | |
download | nextcloud-server-c6c9a51b111acbec51b6dcbaa3cba7497631a2ab.tar.gz nextcloud-server-c6c9a51b111acbec51b6dcbaa3cba7497631a2ab.zip |
distinguish between file dependent shares and other shares
-rw-r--r-- | lib/private/share/share.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index e580acc19c6..5314e09b8de 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -293,9 +293,10 @@ class Share extends \OC\Share\Constants { public static function getItemSharedWithUser($itemType, $itemSource, $user) { $shares = array(); + $fileDependend = false; - $column = ($itemType === 'file' || $itemType === 'folder') ? 'file_source' : 'item_source'; if ($itemType === 'file' || $itemType === 'folder') { + $fileDependend = true; $column = 'file_source'; $where = 'INNER JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE'; } else { @@ -303,7 +304,7 @@ class Share extends \OC\Share\Constants { $where = 'WHERE'; } - $select = self::createSelectStatement(self::FORMAT_NONE, true); + $select = self::createSelectStatement(self::FORMAT_NONE, $fileDependend); $where .= ' `' . $column . '` = ? AND `item_type` = ? '; $arguments = array($itemSource, $itemType); |