summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/noticelist.php8
-rw-r--r--lib/util.php16
2 files changed, 18 insertions, 6 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 6af301839..4182d8808 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -258,8 +258,12 @@ class NoticeListItem extends Widget
function showAuthor()
{
$this->out->elementStart('span', 'vcard author');
- $this->out->elementStart('a', array('href' => $this->profile->profileurl,
- 'class' => 'url'));
+ $attrs = array('href' => $this->profile->profileurl,
+ 'class' => 'url');
+ if (!empty($this->profile->fullname)) {
+ $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
+ }
+ $this->out->elementStart('a', $attrs);
$this->showAvatar();
$this->showNickname();
$this->out->elementEnd('a');
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');