From 9202e93b754d07c0e6312f8b51bd4092ea14961d Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Mon, 20 Jan 2014 05:59:57 -0500 Subject: [PATCH] Fix slicing of returned search result headers --- program/lib/Roundcube/rcube_imap.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index dd0501c..794f25a 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -978,7 +978,7 @@ $search_set->set_message_index($a_msg_headers, $sort_field, $this->sort_order); // only return the requested part of the set - $slice_length = min($page_size, $cnt - ($to > $cnt ? $from : $to)); + $slice_length = min($page_size, $cnt - $from); $a_msg_headers = array_slice(array_values($a_msg_headers), $from, $slice_length); if ($slice) { -- Gitblit v1.9.1