[Pkg-owncloud-commits] [owncloud] 05/34: distinguish between file dependent shares and other shares

David Prévot taffit at moszumanska.debian.org
Fri Oct 17 01:32:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d71fae51f8135dc98c3377d988dfe5095884f9a4
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Mon Oct 13 14:49:16 2014 +0200

    distinguish between file dependent shares and other shares
---
 lib/private/share/share.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index a5010ec..367b06c 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list