make sure that we only find file/folder shares

This commit is contained in:
Bjoern Schiessle 2013-10-09 17:25:58 +02:00
parent 38e5da05af
commit 7fe493fdb8

View file

@ -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));