1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 13:44:12 +02:00

[ticket/11959] Simplify how the users are trimmed.

PHPBB3-11959
This commit is contained in:
Cesar G
2014-02-07 14:56:14 -08:00
parent f0a85a90cc
commit 285ad0f6fa
2 changed files with 27 additions and 39 deletions

View File

@@ -205,30 +205,22 @@ 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)
{
$lang_key .= '_TRIMMED';
$lang_user_cnt = $trimmed_responders_cnt;
$usernames[] = $this->user->lang('NOTIFICATION_X_OTHERS', $trimmed_responders_cnt);
}
else
{
$lang_user_cnt = $responders_cnt;
if ($responders_cnt > 1)
{
$last_user = array_pop($usernames);
}
if (!function_exists('phpbb_gen_string_list'))
{
include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ex);
}
return $this->user->lang(
$lang_key,
implode($this->user->lang['COMMA_SEPARATOR'], $usernames),
$last_user,
$this->language_key,
phpbb_gen_string_list($usernames, $this->user),
censor_text($this->get_data('topic_title')),
$lang_user_cnt
$responders_cnt
);
}