summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorBernhard Reiter <ockham@raz.or.at>2014-09-16 00:20:52 +0200
committerBernhard Reiter <ockham@raz.or.at>2014-10-14 00:06:07 +0200
commit7e9baafc5341bda5b8b86700f90d896b43b85185 (patch)
treecab5ac9af7ba0408c0a38849a25f8d88f5a81447 /lib/public
parent7963125c41b00b7e454c0fcb1406df0cabb42de0 (diff)
downloadnextcloud-server-7e9baafc5341bda5b8b86700f90d896b43b85185.tar.gz
nextcloud-server-7e9baafc5341bda5b8b86700f90d896b43b85185.zip
Add option to include tags for shared items.
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/itagmanager.php5
-rw-r--r--lib/public/itags.php10
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/public/itagmanager.php b/lib/public/itagmanager.php
index 40487de42b4..54daa5cc1cb 100644
--- a/lib/public/itagmanager.php
+++ b/lib/public/itagmanager.php
@@ -48,8 +48,9 @@ interface ITagManager {
* @see \OCP\ITags
* @param string $type The type identifier e.g. 'contact' or 'event'.
* @param array $defaultTags An array of default tags to be used if none are stored.
+ * @param boolean $includeShared Whether to include tags for items shared with this user by others.
* @return \OCP\ITags
*/
- public function load($type, $defaultTags=array());
+ public function load($type, $defaultTags=array(), $includeShared=false);
-} \ No newline at end of file
+}
diff --git a/lib/public/itags.php b/lib/public/itags.php
index 4bfceb8d799..6076ddb4d02 100644
--- a/lib/public/itags.php
+++ b/lib/public/itags.php
@@ -85,6 +85,16 @@ interface ITags {
public function hasTag($name);
/**
+ * Checks whether a tag is saved for the given user,
+ * disregarding the ones shared with him or her.
+ *
+ * @param string $name The tag name to check for.
+ * @param string $user The user whose tags are to be checked.
+ * @return bool
+ */
+ public function userHasTag($name, $user);
+
+ /**
* Add a new tag.
*
* @param string $name A string with a name of the tag