summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-10-11 01:48:02 -0700
committerBjörn Schießle <bjoern@schiessle.org>2013-10-11 01:48:02 -0700
commit4336d42ab095c304d0a46bb30c2d0203e606597e (patch)
tree2041ab6d89f4a9e29cb8d3cc815a0607df3a9ce3 /lib
parent44a5b0bad0e0dbcb0c11de663897ace69b4fd776 (diff)
parent909af2b62e75d1a5db866466074f2bcb95b864dc (diff)
downloadnextcloud-server-4336d42ab095c304d0a46bb30c2d0203e606597e.tar.gz
nextcloud-server-4336d42ab095c304d0a46bb30c2d0203e606597e.zip
Merge pull request #5233 from owncloud/enc_filter_users
only encrypt file to users with encryption keys
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));