users can choose to just see nicknames in streams
This commit is contained in:
parent
ddc121c085
commit
61a3ccf2bf
@ -219,8 +219,14 @@ class NoticeListItem extends Widget
|
|||||||
$this->out->elementStart('a', $attrs);
|
$this->out->elementStart('a', $attrs);
|
||||||
$this->showAvatar();
|
$this->showAvatar();
|
||||||
$this->out->text(' ');
|
$this->out->text(' ');
|
||||||
|
$user = common_current_user();
|
||||||
|
if (!empty($user) && $user->streamNicknames()) {
|
||||||
|
$this->out->element('span',array('class' => 'fn'),
|
||||||
|
$this->profile->nickname);
|
||||||
|
} else {
|
||||||
$this->out->element('span',array('class' => 'fn'),
|
$this->out->element('span',array('class' => 'fn'),
|
||||||
$this->profile->getBestName());
|
$this->profile->getBestName());
|
||||||
|
}
|
||||||
$this->out->elementEnd('a');
|
$this->out->elementEnd('a');
|
||||||
|
|
||||||
$this->out->elementEnd('span');
|
$this->out->elementEnd('span');
|
||||||
@ -262,11 +268,15 @@ class NoticeListItem extends Widget
|
|||||||
|
|
||||||
$groups = $this->getGroups();
|
$groups = $this->getGroups();
|
||||||
|
|
||||||
|
$user = common_current_user();
|
||||||
|
|
||||||
|
$streamNicknames = !empty($user) && $user->streamNicknames();
|
||||||
|
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
$ga[] = array('href' => $group->homeUrl(),
|
$ga[] = array('href' => $group->homeUrl(),
|
||||||
'title' => $group->nickname,
|
'title' => $group->nickname,
|
||||||
'class' => 'addressee group',
|
'class' => 'addressee group',
|
||||||
'text' => $group->getBestName());
|
'text' => ($streamNicknames) ? $group->nickname : $group->getBestName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ga;
|
return $ga;
|
||||||
@ -283,11 +293,15 @@ class NoticeListItem extends Widget
|
|||||||
|
|
||||||
$replies = $this->getReplyProfiles();
|
$replies = $this->getReplyProfiles();
|
||||||
|
|
||||||
|
$user = common_current_user();
|
||||||
|
|
||||||
|
$streamNicknames = !empty($user) && $user->streamNicknames();
|
||||||
|
|
||||||
foreach ($replies as $reply) {
|
foreach ($replies as $reply) {
|
||||||
$pa[] = array('href' => $reply->profileurl,
|
$pa[] = array('href' => $reply->profileurl,
|
||||||
'title' => $reply->nickname,
|
'title' => $reply->nickname,
|
||||||
'class' => 'addressee account',
|
'class' => 'addressee account',
|
||||||
'text' => $reply->getBestName());
|
'text' => ($streamNicknames) ? $reply->nickname : $reply->getBestName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $pa;
|
return $pa;
|
||||||
|
Loading…
Reference in New Issue
Block a user