From: Michael M Slusarz Date: Mon, 6 Jul 2009 04:54:55 +0000 (-0600) Subject: POP3 fix X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c04debf002afcb53fb510f578c8158045423cdb9;p=horde.git POP3 fix --- diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index e43abac52..83a6eb879 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -119,10 +119,15 @@ class IMP_Mailbox { if (!is_null($this->_arrayIndex)) { /* Casting $_sorted to integers saves a significant amount of - * space when json_encoding (no need to quote every value). */ + * space when json_encoding (no need to quote every value). Only + * can do for IMAP though (since POP3 UIDs are not limited to + * integers. */ + $sorted = ($_SESSION['imp']['protocol'] == 'pop') + ? $this->_sorted + : array_map('intval', $this->_sorted); $_SESSION['imp']['cache']['imp_mailbox'][$this->_mailbox] = $this->_searchmbox - ? json_encode(array('m' => $this->_sortedMbox, 's' => array_map('intval', $this->_sorted))) - : json_encode(array_map('intval', $this->_sorted)); + ? json_encode(array('m' => $this->_sortedMbox, 's' => $sorted)) + : json_encode($sorted); } }