summaryrefslogtreecommitdiff
path: root/program/steps/mail/autocomplete.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-12-18 17:56:50 +0000
committerthomascube <thomas@roundcube.net>2008-12-18 17:56:50 +0000
commit1553b3c7019285a4b333531dcce2013f79c963c1 (patch)
tree6f7ca94e1d3d6aab99387502fa00b8f94a96470c /program/steps/mail/autocomplete.inc
parent0456f83bcc274c30cb353f2c9bccd30aa3a32853 (diff)
Bugfix and improve auto-completion
Diffstat (limited to 'program/steps/mail/autocomplete.inc')
-rw-r--r--program/steps/mail/autocomplete.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc
index 4bc5dc263..fe011de0a 100644
--- a/program/steps/mail/autocomplete.inc
+++ b/program/steps/mail/autocomplete.inc
@@ -19,13 +19,14 @@
*/
+$MAXNUM = 15; // same limit as in app.js
$contacts = array();
if ($search = get_input_value('_search', RCUBE_INPUT_POST)) {
foreach ($RCMAIL->config->get('autocomplete_addressbooks', array('sql')) as $id) {
$abook = $RCMAIL->get_address_book($id);
- $abook->set_pagesize(20);
+ $abook->set_pagesize($MAXNUM);
if ($result = $abook->search(array('email','name'), $search)) {
while ($sql_arr = $result->iterate()) {
@@ -34,6 +35,9 @@ if ($search = get_input_value('_search', RCUBE_INPUT_POST)) {
}
}
}
+
+ if (count($contacts) >= $MAXNUM)
+ break;
}
sort($contacts);