diff options
author | Brion Vibber <brion@pobox.com> | 2010-04-05 10:42:41 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-04-05 10:42:41 -0700 |
commit | b71f276ed5420bc17262fe7981617ce6e27839c4 (patch) | |
tree | 104c6fe37665d434635e3970c151aca52612efc7 /lib/profilelist.php | |
parent | f2b60b78b6096447a8aadc3d5075bb916f89880a (diff) | |
parent | 2a489018b11838280ef0c74f6727d5b9c0c10a0f (diff) |
Merge branch 'master' into testing
Diffstat (limited to 'lib/profilelist.php')
-rw-r--r-- | lib/profilelist.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php index 3e5513895..b010fb724 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, @@ -223,8 +222,8 @@ class ProfileListItem extends Widget { if (!empty($this->profile->homepage)) { $this->out->text(' '); - $this->out->elementStart('a', array('href' => $this->profile->homepage, - 'class' => 'url')); + $aAttrs = $this->homepageAttributes(); + $this->out->elementStart('a', $aAttrs); $this->out->raw($this->highlight($this->profile->homepage)); $this->out->elementEnd('a'); } @@ -299,4 +298,17 @@ class ProfileListItem extends Widget { return htmlspecialchars($text); } + + function linkAttributes() + { + return array('href' => $this->profile->profileurl, + 'class' => 'url entry-title', + 'rel' => 'contact'); + } + + function homepageAttributes() + { + return array('href' => $this->profile->homepage, + 'class' => 'url'); + } } |