From: Bjoern Schiessle Date: Wed, 9 Oct 2013 15:25:58 +0000 (+0200) Subject: make sure that we only find file/folder shares X-Git-Tag: v5.0.13~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=621390b10b56e22e8ef95312f680049d9c58e029;p=nextcloud-server.git make sure that we only find file/folder shares --- diff --git a/lib/public/share.php b/lib/public/share.php index 0a88ea4ea44..c9807126742 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));