]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add titles to group links in notices
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 30 Mar 2009 14:26:36 +0000 (10:26 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 30 Mar 2009 14:26:36 +0000 (10:26 -0400)
lib/util.php

index 7b2930914fd52070553cdfb579010f669dd2bd47..ef73adc36415bc19b93be7ef6d6133c628ee2625 100644 (file)
@@ -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');