From 19401f6530f874f9bbbd71e251873bf678f2d7a5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 5 Apr 2010 10:46:26 -0400 Subject: add linkAttributes() method for profilelist --- lib/profilelist.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib') 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'); + } } -- cgit v1.2.3-54-g00ecf