Fullname is in the profile, not the user object

darcs-hash:20080720101553-533db-3ebe6e3cd4b9e1b937df076b876bc3f9b826f476.gz
This commit is contained in:
Mike Cochrane 2008-07-20 06:15:53 -04:00
parent 12e610a223
commit 5cf6174c39

View File

@ -38,6 +38,9 @@ class StreamAction extends Action {
if ($nickname) { if ($nickname) {
$user = User::staticGet('nickname', $nickname); $user = User::staticGet('nickname', $nickname);
$user_profile = $user->getProfile();
} else {
$user_profile = false;
} }
common_element_start('ul', array('id' => 'nav_views')); common_element_start('ul', array('id' => 'nav_views'));
@ -45,17 +48,17 @@ class StreamAction extends Action {
common_menu_item(common_local_url('all', array('nickname' => common_menu_item(common_local_url('all', array('nickname' =>
$nickname)), $nickname)),
_('Personal'), _('Personal'),
sprintf(_('%s and friends'), (($user && $user->fullname) ? $user->fullname : $nickname)), sprintf(_('%s and friends'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
$action == 'all'); $action == 'all');
common_menu_item(common_local_url('replies', array('nickname' => common_menu_item(common_local_url('replies', array('nickname' =>
$nickname)), $nickname)),
_('Replies'), _('Replies'),
sprintf(_('Replies to %s'), (($user && $user->fullname) ? $user->fullname : $nickname)), sprintf(_('Replies to %s'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
$action == 'replies'); $action == 'replies');
common_menu_item(common_local_url('showstream', array('nickname' => common_menu_item(common_local_url('showstream', array('nickname' =>
$nickname)), $nickname)),
_('Profile'), _('Profile'),
($user && $user->fullname) ? $user->fullname : $nickname, ($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname,
$action == 'showstream'); $action == 'showstream');
common_element_end('ul'); common_element_end('ul');
} }