diff options
author | Cesar G <prototech91@gmail.com> | 2014-02-07 14:56:14 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-03-19 03:08:33 -0700 |
commit | 285ad0f6faac275c56576616ed6a880a7f88e94b (patch) | |
tree | 0e64dbd8327004dae47f0798b428684e7131e5fb /phpBB/phpbb | |
parent | f0a85a90cc61859d1821960b8e3c50a8187202a7 (diff) | |
download | forums-285ad0f6faac275c56576616ed6a880a7f88e94b.tar forums-285ad0f6faac275c56576616ed6a880a7f88e94b.tar.gz forums-285ad0f6faac275c56576616ed6a880a7f88e94b.tar.bz2 forums-285ad0f6faac275c56576616ed6a880a7f88e94b.tar.xz forums-285ad0f6faac275c56576616ed6a880a7f88e94b.zip |
[ticket/11959] Simplify how the users are trimmed.
PHPBB3-11959
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/notification/type/post.php | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 944023cba4..62c8bd52cb 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -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 ); } |