Skip to content

Commit

Permalink
[mms] Fix client-side sorting of display addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Aug 18, 2014
1 parent 72e13a6 commit 326d317
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 4 additions & 10 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket/ClientSort.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,10 @@ protected function _clientSortProcess($res, $fetch_res, $sort)
: 'to';

foreach ($slice as $num) {
$env = $fetch_res[$num]->getEnvelope();

if (empty($env->$field)) {
$sorted[$num] = null;
} else {
$addr_ob = reset($env->$field);
if (is_null($sorted[$num] = $addr_ob->personal)) {
$sorted[$num] = $addr_ob->mailbox;
}
}
$ob = $fetch_res[$num]->getEnvelope()->$field;
$sorted[$num] = ($addr_ob = $ob[0])
? $addr_ob->personal ?: $addr_ob->mailbox
: null;
}

asort($sorted, SORT_LOCALE_STRING);
Expand Down
2 changes: 2 additions & 0 deletions framework/Imap_Client/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix client-side sorting of display addresses.
* [mms] Even more improved pseudo-UIDNEXT value for POP3 servers.
* [mms] Improved sanity checking so that non-ASCII data is not sent to server in commands where it is not supported.
</notes>
Expand Down Expand Up @@ -2639,6 +2640,7 @@
<date>2014-08-18</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix client-side sorting of display addresses.
* [mms] Even more improved pseudo-UIDNEXT value for POP3 servers.
* [mms] Improved sanity checking so that non-ASCII data is not sent to server in commands where it is not supported.
</notes>
Expand Down

0 comments on commit 326d317

Please sign in to comment.