aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-17 13:53:20 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-17 13:53:20 +0000
commitcbe4d2f7345935e261071aac22140744748d7426 (patch)
tree304f6c962e74365c2f91c731c9059f18474a8d43 /services
parent3f9a5210f18c5d4418c3c2d8788f9babf1a231c4 (diff)
downloadsemanticscuttle-cbe4d2f7345935e261071aac22140744748d7426.tar.gz
semanticscuttle-cbe4d2f7345935e261071aac22140744748d7426.tar.bz2
Interface fix: add tags from contacts into ajax tag list when adding/editing a bookmark.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@290 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services')
-rw-r--r--services/bookmark2tagservice.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/bookmark2tagservice.php b/services/bookmark2tagservice.php
index 86cb88a..99c97af 100644
--- a/services/bookmark2tagservice.php
+++ b/services/bookmark2tagservice.php
@@ -338,6 +338,20 @@ class Bookmark2TagService {
// ask for their tags
return $this->getPopularTags($admins, $limit, $logged_on_user, $days);
}
+
+ function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
+ // look for contact ids
+ $userservice = & ServiceFactory :: getServiceInstance('UserService');
+ $contacts = $userservice->getWatchlist($user);
+
+ // add the user (to show him/her also his/her tags)
+ if(!is_null($logged_on_user)) {
+ $contacts[] = $logged_on_user;
+ }
+
+ // ask for their tags
+ return $this->getPopularTags($contacts, $limit, $logged_on_user, $days);
+ }
// $users can be {NULL, an id, an array of id}
function &getPopularTags($user = NULL, $limit = 30, $logged_on_user = NULL, $days = NULL) {