From 188304872066eef4b20c305f9cd6ea939dd419e0 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 08 Apr 2014 04:58:56 -0400
Subject: [PATCH] Optimize header fetching of multi-folder searches with natural (UID) sorting
---
program/lib/Roundcube/rcube_result_multifolder.php | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/program/lib/Roundcube/rcube_result_multifolder.php b/program/lib/Roundcube/rcube_result_multifolder.php
index ac08895..74a3d78 100644
--- a/program/lib/Roundcube/rcube_result_multifolder.php
+++ b/program/lib/Roundcube/rcube_result_multifolder.php
@@ -169,6 +169,21 @@
}
/**
+ * Slices data set.
+ *
+ * @param $offset Offset (as for PHP's array_slice())
+ * @param $length Number of elements (as for PHP's array_slice())
+ *
+ */
+ public function slice($offset, $length)
+ {
+ $data = array_slice($this->get(), $offset, $length);
+
+ $this->index = $data;
+ $this->meta['count'] = count($data);
+ }
+
+ /**
* Filters data set. Removes elements not listed in $ids list.
*
* @param array $ids List of IDs to keep.
--
Gitblit v1.9.1