summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-05 13:45:21 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-05 13:45:21 +0200
commit352c1415be55ae5797685d2ea22fcd07cdfbf4ec (patch)
treea101003c9a15dd89b99a63914444e241241d23de /lib/public
parentd1d68855850022ee4dd91105f00a947029f2e4c8 (diff)
downloadnextcloud-server-352c1415be55ae5797685d2ea22fcd07cdfbf4ec.tar.gz
nextcloud-server-352c1415be55ae5797685d2ea22fcd07cdfbf4ec.zip
proper fix for getting the shared item if no user is logged in
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index de7025d7b15..28878c2c868 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -312,12 +312,23 @@ class Share {
* @return Return depends on format
*/
public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE,
- $parameters = null, $includeCollections = false) {
+ $parameters = null, $includeCollections = false) {
return self::getItems($itemType, $itemSource, null, null, \OC_User::getUser(), $format,
$parameters, -1, $includeCollections);
}
/**
+ * @param $itemType
+ * @param $itemSource
+ * @param $uid_owner
+ * @return mixed
+ */
+ public static function getSharedItem($itemType, $itemSource, $uid_owner) {
+ return self::getItems($itemType, $itemSource, null, null, $uid_owner, self::FORMAT_NONE,
+ null, 1, false);
+ }
+
+ /**
* Get all users an item is shared with
* @param string Item type
* @param string Item source