distinguish between file dependent shares and other shares
This commit is contained in:
parent
4b9465b937
commit
c6c9a51b11
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue