diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-14 21:47:42 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-14 21:47:42 -0400 |
commit | 596b386a950ecffb453bffe810b5de6af2eacce8 (patch) | |
tree | cc5d5314537fc7826863d76f0e22a1cd7a484d77 /actions/showstream.php | |
parent | 2fcae93272eb2d4e432c60cc4f5fd7f70c9d9f22 (diff) |
show default profile image in showstream
darcs-hash:20080615014742-84dde-d39f4c7744dc430fdb4ad64a172ffe3e909ee4a0.gz
Diffstat (limited to 'actions/showstream.php')
-rw-r--r-- | actions/showstream.php | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/actions/showstream.php b/actions/showstream.php index 2fc5184c3..a9073df86 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -113,27 +113,26 @@ class ShowstreamAction extends StreamAction { function show_personal($profile) { $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - if ($avatar) { - common_element_start('div', array('id' => 'profile_avatar')); - common_element('img', array('src' => $avatar->url, - 'class' => 'avatar profile', - 'width' => AVATAR_PROFILE_SIZE, - 'height' => AVATAR_PROFILE_SIZE, - 'alt' => $profile->nickname)); - $cur = common_current_user(); - if ($cur) { - if ($cur->id != $profile->id) { - if ($cur->isSubscribed($profile)) { - $this->show_unsubscribe_form($profile); - } else { - $this->show_subscribe_form($profile); - } + common_element_start('div', array('id' => 'profile_avatar')); + common_element('img', array('src' => ($avatar) ? $avatar->url : common_default_avatar(AVATAR_PROFILE_SIZE), + 'class' => 'avatar profile', + 'width' => AVATAR_PROFILE_SIZE, + 'height' => AVATAR_PROFILE_SIZE, + 'alt' => $profile->nickname)); + $cur = common_current_user(); + if ($cur) { + if ($cur->id != $profile->id) { + if ($cur->isSubscribed($profile)) { + $this->show_unsubscribe_form($profile); + } else { + $this->show_subscribe_form($profile); } - } else { - $this->show_remote_subscribe_form($profile); } - common_element_end('div'); + } else { + $this->show_remote_subscribe_form($profile); } + common_element_end('div'); + common_element_start('div', array('id' => 'profile_information')); if ($profile->fullname) { |