summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-30 10:26:36 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-30 10:26:36 -0400
commitd5ac986b800858348dec746d64c8b907043ba225 (patch)
treeb269d219581fbc3890fe58e8e45d89fd0f2a3d9f /lib
parent3af66807161628969395bfb65ada38f977c94edf (diff)
add titles to group links in notices
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 7b2930914..ef73adc36 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -643,10 +643,14 @@ function common_group_link($sender_id, $nickname)
$sender = Profile::staticGet($sender_id);
$group = User_group::staticGet('nickname', common_canonical_nickname($nickname));
if ($group && $sender->isMember($group)) {
+ $attrs = array('href' => $group->permalink(),
+ 'class' => 'url');
+ if (!empty($group->fullname)) {
+ $attrs['title'] = $group->fullname . ' (' . $group->nickname . ')';
+ }
$xs = new XMLStringer();
$xs->elementStart('span', 'vcard');
- $xs->elementStart('a', array('href' => $group->permalink(),
- 'class' => 'url'));
+ $xs->elementStart('a', $attrs);
$xs->element('span', 'fn nickname', $nickname);
$xs->elementEnd('a');
$xs->elementEnd('span');