summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-25 16:29:02 +0000
committeralecpl <alec@alec.pl>2010-03-25 16:29:02 +0000
commitfb7ec576ab3a353b6eb99614e9636a9096462807 (patch)
tree9397ede61815ac232bedddc728a973e1b67f0c11 /program/lib
parent5ffceb790602cb00f92acd8f275fe8246cb36222 (diff)
- Added possibility to select all messages in a folder (#1484756)
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/imap.inc15
1 files changed, 7 insertions, 8 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index b7c0b69eb..fc55d73ef 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -1066,16 +1066,15 @@ function iil_C_UIDToMID(&$conn, $mailbox, $uid) {
return false;
}
-function iil_C_FetchUIDs(&$conn,$mailbox) {
+function iil_C_FetchUIDs(&$conn, $mailbox, $message_set=null) {
global $clock;
+
+ if (is_array($message_set))
+ $message_set = join(',', $message_set);
+ else if (empty($message_set))
+ $message_set = '1:*';
- $num = iil_C_CountMessages($conn, $mailbox);
- if ($num == 0) {
- return array();
- }
- $message_set = '1' . ($num>1?':' . $num:'');
-
- return iil_C_FetchHeaderIndex($conn, $mailbox, $message_set, 'UID');
+ return iil_C_FetchHeaderIndex($conn, $mailbox, $message_set, 'UID', false);
}
function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false, $bodystr=false, $add='')