summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-07-19 19:36:35 +0000
committerthomascube <thomas@roundcube.net>2006-07-19 19:36:35 +0000
commit078adf9da77f7ca6a3c02f9ef71be687aedb8856 (patch)
tree5a1c53d1835d4941ae4be4694ee62ef4dac8bf33 /program/include/rcube_imap.inc
parent66e2bfa5507ebbbc73dc5fcabe511cd473e0c62a (diff)
Improved usability (Ticket #1483807) and HTML validity; applied patch #1328032; fixed bug #1443200
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r--program/include/rcube_imap.inc30
1 files changed, 6 insertions, 24 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index bc12eac06..177d05a62 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -501,29 +501,11 @@ class rcube_imap
$start_msg = ($this->list_page-1) * $this->page_size;
list($begin, $end) = $this->_get_message_range($max, $page);
-
- /*
- if ($page=='all')
- {
- $begin = 0;
- $end = $max;
- }
- else if (!$this->get_capability('sort') && $this->sort_order=='DESC')
- {
- $begin = $max - $this->page_size - $start_msg;
- $end = $max - $start_msg;
- }
- else
- {
- $begin = $start_msg;
- $end = $start_msg + $this->page_size;
- }
-
- if ($begin < 0) $begin = 0;
- if ($end < 0) $end = $max;
- if ($end > $max) $end = $max;
- */
-
+
+ // mailbox is empty
+ if ($begin >= $end)
+ return array();
+
//console("fetch headers $start_msg to ".($start_msg+$this->page_size)." (msg $begin to $end)");
$headers_sorted = FALSE;
@@ -553,7 +535,7 @@ class rcube_imap
}
else
{
- $msgs = sprintf("%d:%d", $begin+1, $end);
+ $msgs = sprintf("%d:%d", $begin+1, $end);
$sorted = FALSE;
}