summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-10-09 17:25:58 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-10-09 17:25:58 +0200
commit7fe493fdb8d662b20b435c86aa23eb3b38a271b1 (patch)
tree281d9be57964bbb6d0e27eb7c7a32284a570cb2a /lib
parent38e5da05afede2e6dcd5465f47b3e4576ad37d64 (diff)
downloadnextcloud-server-7fe493fdb8d662b20b435c86aa23eb3b38a271b1.tar.gz
nextcloud-server-7fe493fdb8d662b20b435c86aa23eb3b38a271b1.zip
make sure that we only find file/folder shares
Diffstat (limited to 'lib')
-rw-r--r--lib/public/share.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index e6a74117aa2..66605dafee5 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -155,13 +155,13 @@ class Share {
while ($source !== -1) {
- // Fetch all shares of this file path from DB
+ // Fetch all shares with another user
$query = \OC_DB::prepare(
'SELECT `share_with`
FROM
`*PREFIX*share`
WHERE
- `item_source` = ? AND `share_type` = ?'
+ `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
);
$result = $query->execute(array($source, self::SHARE_TYPE_USER));
@@ -180,7 +180,7 @@ class Share {
FROM
`*PREFIX*share`
WHERE
- `item_source` = ? AND `share_type` = ?'
+ `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
);
$result = $query->execute(array($source, self::SHARE_TYPE_GROUP));
@@ -201,7 +201,7 @@ class Share {
FROM
`*PREFIX*share`
WHERE
- `item_source` = ? AND `share_type` = ?'
+ `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')'
);
$result = $query->execute(array($source, self::SHARE_TYPE_LINK));