1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11959] List the last user with "and" instead of a comma.

PHPBB3-11959
This commit is contained in:
Cesar G
2013-12-01 12:20:43 -08:00
parent 126ee37f66
commit b32a66ca78
2 changed files with 22 additions and 6 deletions

View File

@@ -205,6 +205,7 @@ class post extends \phpbb\notification\type\base
$usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile');
}
}
$last_user = '';
$lang_key = $this->language_key;
if ($trimmed_responders_cnt)
@@ -215,11 +216,17 @@ class post extends \phpbb\notification\type\base
else
{
$lang_user_cnt = $responders_cnt;
if ($responders_cnt > 1)
{
$last_user = array_pop($usernames);
}
}
return $this->user->lang(
$lang_key,
implode($this->user->lang['COMMA_SEPARATOR'], $usernames),
$last_user,
censor_text($this->get_data('topic_title')),
$lang_user_cnt
);