From b32a66ca78b6170c0d90b7776dabdf8f343c557a Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sun, 1 Dec 2013 12:20:43 -0800 Subject: [ticket/11959] List the last user with "and" instead of a comma. PHPBB3-11959 --- phpBB/phpbb/notification/type/post.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index a883e67bd4..944023cba4 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -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 ); -- cgit v1.2.1