diff --git a/CHANGELOG b/CHANGELOG index cac1ba49d..badbdd156 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ CHANGELOG Roundcube Webmail - Fix regression where "Open in new window" action didn't work (#7155) - Fix PHP Warning: array_filter() expects parameter 1 to be array, null given in subscriptions_option plugin (#7165) - Fix unexpected error message when mail refresh involves folder auto-unsubscribe (#6923) +- Fix recipient duplicates in print-view when the recipient list has been expanded (#7169) RELEASE 1.4.2 ------------- diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 0edf5dc7a..6d01afef2 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1280,6 +1280,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, $j = 0; $out = ''; $allvalues = array(); + $shown_addresses = array(); $show_email = $RCMAIL->config->get('message_show_email'); if ($addicon && !isset($_SESSION['writeable_abook'])) { @@ -1363,6 +1364,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, if (!$moreadrs) { $out .= ($out ? ', ' : '') . $address; + $shown_addresses[] = $address; } if ($max && $j == $max && $c > $j) { @@ -1385,7 +1387,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, 'class' => 'morelink', 'onclick' => '$(this).hide().next().show()', ), $label) - . html::span(array('style' => 'display:none'), join(', ', $allvalues)); + . html::span(array('style' => 'display:none'), join(', ', array_diff($allvalues, $shown_addresses))); } else { $out .= ' ' . html::a(array(