summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-30 11:11:33 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-30 11:11:33 -0400
commit7b02d9d2e14153afd989f7373f3453b9bec3c2a0 (patch)
treec96ab52f879e3ebefa84c9d87a0e5854136c8022 /lib/util.php
parent73fbf6580045939bfe9276820476be01d72c0687 (diff)
parenta68836acb4c43500dbff89be1faec19969bc34c2 (diff)
Merge branch 'master' into 0.7.x
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index 0a1137a77..fdcae0aca 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -622,9 +622,13 @@ function common_at_link($sender_id, $nickname)
$url = $recipient->profileurl;
}
$xs = new XMLStringer(false);
+ $attrs = array('href' => $url,
+ 'class' => 'url');
+ if (!empty($recipient->fullname)) {
+ $attrs['title'] = $recipient->fullname . ' (' . $recipient->nickname . ')';
+ }
$xs->elementStart('span', 'vcard');
- $xs->elementStart('a', array('href' => $url,
- 'class' => 'url'));
+ $xs->elementStart('a', $attrs);
$xs->element('span', 'fn nickname', $nickname);
$xs->elementEnd('a');
$xs->elementEnd('span');
@@ -639,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');