Skip to content

Commit

Permalink
[mms] Fix parsing mailbox name from STATUS response on servers that h…
Browse files Browse the repository at this point in the history
…ave the UTF8 extension enabled.
  • Loading branch information
slusarz committed Apr 27, 2015
1 parent 62b549f commit 12b0542
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 5 additions & 2 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -1670,9 +1670,12 @@ protected function _status($mboxes, $flags)
*/
protected function _parseStatus(Horde_Imap_Client_Tokenize $data)
{
// Mailbox name is in UTF7-IMAP
// Mailbox name is in UTF7-IMAP (unless UTF8 has been enabled).
$mbox_ob = $this->_mailboxOb(
Horde_Imap_Client_Mailbox::get($data->next(), true)
Horde_Imap_Client_Mailbox::get(
$data->next(),
!$this->_capability()->isEnabled('UTF8=ACCEPT')
)
);

$data->next();
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 parsing mailbox name from STATUS response on servers that have the UTF8 extension enabled.
* [jan] Fix searching with non-ASCII strings in AND/OR-combined searches.
* [jan] Fix issues with certain locales like Turkish.
* [mms] Pipeline ID command with other commands, if possible.
Expand Down Expand Up @@ -2860,6 +2861,7 @@
<date>2015-03-25</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix parsing mailbox name from STATUS response on servers that have the UTF8 extension enabled.
* [jan] Fix searching with non-ASCII strings in AND/OR-combined searches.
* [jan] Fix issues with certain locales like Turkish.
* [mms] Pipeline ID command with other commands, if possible.
Expand Down
10 changes: 10 additions & 0 deletions framework/Imap_Client/test/Horde/Imap/Client/Live/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ public function testStatus()
Horde_Imap_Client::STATUS_FIRSTUNSEEN | Horde_Imap_Client::STATUS_FLAGS | Horde_Imap_Client::STATUS_PERMFLAGS | Horde_Imap_Client::STATUS_HIGHESTMODSEQ | Horde_Imap_Client::STATUS_UIDNOTSTICKY
);
$this->assertInternalType('array', $s);

// Github Issue #134 (UTF8 mailbox)
$s = self::$live->status(
self::$test_mbox_utf8,
Horde_Imap_Client::STATUS_MESSAGES
);
$this->assertEquals(
0,
$s['messages']
);
}

/**
Expand Down

0 comments on commit 12b0542

Please sign in to comment.