aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/bookmark2tagservice.php14
-rw-r--r--templates/editbookmark.tpl.php2
2 files changed, 15 insertions, 1 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) {
diff --git a/templates/editbookmark.tpl.php b/templates/editbookmark.tpl.php
index 92357d1..5a24cf4 100644
--- a/templates/editbookmark.tpl.php
+++ b/templates/editbookmark.tpl.php
@@ -68,7 +68,7 @@ $this->includeTemplate("dojo.inc");
<tr>
<th align="left"><?php echo T_('Tags'); ?></th>
<td class="scuttletheme">
- <span dojoType="dojo.data.ItemFileReadStore" jsId="memberTagStore" url="<?php echo ROOT?>ajax/<?php echo ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin())?'getadmintags':'gettags'?>.php"></span>
+ <span dojoType="dojo.data.ItemFileReadStore" jsId="memberTagStore" url="<?php echo ROOT?>ajax/<?php echo ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin())?'getadmintags':'getcontacttags'?>.php"></span>
<input type="text" dojoType="js.MultiComboBox" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" store="memberTagStore" delimiter="," searchAttr="tag" hasDownArrow="false" queryExpr="*${0}*" autoComplete="false" highlightMatch="all"/></td>
<td>&larr; <?php echo T_('Comma-separated'); ?></td>
</tr>