} else {
$profile = Profile::staticGet('id', $id);
if ($profile) {
- $links[] = sprintf('<a href="%s" title="%s">%s</a>',
+ $links[] = sprintf('<a href="%s">%s</a>',
htmlspecialchars($profile->profileurl),
- htmlspecialchars($profile->getBestName()),
- htmlspecialchars($profile->nickname));
+ htmlspecialchars($profile->getBestName()));
}
}
}
return $profiles;
}
+ function magicList($items)
+ {
+ if (count($items) > 4) {
+ return parent::magicList(array_slice($items, 0, 3));
+ } else {
+ return parent::magicList($items);
+ }
+ }
+
function getListMessage($count, $you)
{
if ($count == 1 && $you) {
// darn first person being different from third person!
// TRANS: List message for notice favoured by logged in user.
- return _m('FAVELIST', 'You have favored this notice.');
+ return _m('FAVELIST', 'You like this.');
+ } else if ($count > 4) {
+ // TRANS: List message for when more than 4 people like something.
+ return sprintf(_m('FAVELIST', '%%s and %d others like this.'),
+ $count - 3);
} else {
// TRANS: List message for favoured notices.
// TRANS: %d is the number of users that have favoured a notice.
- return sprintf(_m('One person has favored this notice.',
- '%d people have favored this notice.',
+ return sprintf(_m('%%s likes this.',
+ '%%s like this.',
$count),
$count);
}
}
+
function showStart()
{
$this->out->elementStart('li', array('class' => 'notice-data notice-faves'));
function setPassword()
{
if (!empty($this->invitation)) {
- $email = $this->invitation->address;
+ $email = trim($this->invitation->address);
} else if (!empty($this->confirmation)) {
- $email = $this->confirmation->address;
+ $email = trim($this->confirmation->address);
} else {
throw new Exception('No confirmation thing.');
}