aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-10-13 14:49:16 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-10-13 15:04:54 +0200
commitc6c9a51b111acbec51b6dcbaa3cba7497631a2ab (patch)
treec4704eaec59a665365d2347fddc9f0436330109a
parent4b9465b937a7754d2b58a77cf8f12adeaccef993 (diff)
downloadnextcloud-server-c6c9a51b111acbec51b6dcbaa3cba7497631a2ab.tar.gz
nextcloud-server-c6c9a51b111acbec51b6dcbaa3cba7497631a2ab.zip
distinguish between file dependent shares and other shares
-rw-r--r--lib/private/share/share.php5
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);