6.0.0-beta1
7/6/25

[#13421] Sort by from address is broken since v6.2.1
Summary Sort by from address is broken since v6.2.1
Queue IMP
Queue Version 6.2.1
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester marth (at) tsvschlieben (dot) de
Created 08/06/2014 (3987 days ago)
Due
Updated 08/06/2014 (3987 days ago)
Assigned
Resolved 08/06/2014 (3987 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/06/2014 07:21:36 PM Michael Slusarz Comment #4
Assigned to Michael Slusarz
State ⇒ Resolved
Priority ⇒ 1. Low
Reply to this comment
Weird ... that was the only test case I didn't have.

Horde_Imap_Client 2.24.1
08/06/2014 07:19:26 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 533cba5003815896981438c24feffe94347ed78c
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Aug 6 12:06:51 2014 -0600

     [mms] Fix regression in reporting capabilities (Bug #13421).

  .../lib/Horde/Imap/Client/Data/Capability.php      |    6 +++---
  framework/Imap_Client/package.xml                  |    4 ++--
  .../test/Horde/Imap/Client/Data/CapabilityTest.php |    1 +
  3 files changed, 6 insertions(+), 5 deletions(-)

http://github.com/horde/horde/commit/533cba5003815896981438c24feffe94347ed78c
08/06/2014 11:30:47 AM marth (at) tsvschlieben (dot) de Comment #2 Reply to this comment
Let me correct myself :)
Returns TRUE if query ('SORT', 'DISPLAY') --> CORRECT
Returns FALSE if query ('SORT', 'DISPLAY') --> CORRECT

08/06/2014 11:29:11 AM marth (at) tsvschlieben (dot) de Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Sort by from address is broken since v6.2.1
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Since v6.2.1 sorting by From is broken.

IMAP server announces support for SORT but not for DISPLAY. This check 
has a logical error:

Horde/Imap/Client/Data/Capability.php: query($capability, $parameter = NULL)

  return (is_null($parameter) || !is_array($this->_data[$capability]))
             ? true
             : in_array(strtoupper($parameter), $this->_data[$capability]);

Returns TRUE if query ('SORT', 'DISPLAY') --> INCORRECT

Suggested fix:

return (is_null($parameter) || (is_array($_data[$capability]) && 
in_array(strtoupper($parameter), $_data[$capability])))
             ? true
             : false;

Returns TRUE if query ('SORT', 'DISPLAY') --> CORRECT

Saved Queries