]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add linkAttributes() method for profilelist
authorEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:46:26 +0000 (10:46 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:46:26 +0000 (10:46 -0400)
lib/profilelist.php

index 3e5513895ce5c4caebdde866e30b0eeb6f111f7a..934907bc35ec075b8712a434f8178cab8e966888 100644 (file)
@@ -181,9 +181,8 @@ class ProfileListItem extends Widget
     function showAvatar()
     {
         $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
-        $this->out->elementStart('a', array('href' => $this->profile->profileurl,
-                                            'class' => 'url entry-title',
-                                            'rel' => 'contact'));
+        $aAttrs = $this->linkAttributes();
+        $this->out->elementStart('a', $aAttrs);
         $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE),
                                          'class' => 'photo avatar',
                                          'width' => AVATAR_STREAM_SIZE,
@@ -299,4 +298,11 @@ class ProfileListItem extends Widget
     {
         return htmlspecialchars($text);
     }
+
+    function linkAttributes()
+    {
+        return array('href' => $this->profile->profileurl,
+                     'class' => 'url entry-title',
+                     'rel' => 'contact');
+    }
 }