summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-18 17:56:50 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-18 17:56:50 +0000
commit5ede29d35a8e674160703512a0602a1578ed16c2 (patch)
tree37dc45bd2d82031e55685ead5dc9b77c30d81393 /roundcubemail/program/steps
parenta55054b937eefbc9479983cc941c062210d49ba1 (diff)
Bugfix and improve auto-completion
git-svn-id: https://svn.roundcube.net/trunk@2176 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/mail/autocomplete.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/mail/autocomplete.inc b/roundcubemail/program/steps/mail/autocomplete.inc
index 4bc5dc263..fe011de0a 100644
--- a/roundcubemail/program/steps/mail/autocomplete.inc
+++ b/roundcubemail/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);