summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-04-05 10:46:26 -0400
committerEvan Prodromou <evan@status.net>2010-04-05 10:46:26 -0400
commit19401f6530f874f9bbbd71e251873bf678f2d7a5 (patch)
tree2510cb746c5eb90f9d0df09d040ca6550ca95f8c
parenta313aeab9cddabc2fd02dfbe98a7aa83653260da (diff)
add linkAttributes() method for profilelist
-rw-r--r--lib/profilelist.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php
index 3e5513895..934907bc3 100644
--- a/lib/profilelist.php
+++ b/lib/profilelist.php
@@ -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');
+ }
}