From c6c9a51b111acbec51b6dcbaa3cba7497631a2ab Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 13 Oct 2014 14:49:16 +0200 Subject: distinguish between file dependent shares and other shares --- lib/private/share/share.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/share') 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); -- cgit v1.2.3