From 08ffd939a7530c44cd68b455f75175f79698073c Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 29 Dec 2011 09:35:01 +0000 Subject: - Add separate pagesize setting for mail messages and contacts (#1488269) --- program/steps/addressbook/search.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'program/steps/addressbook/search.inc') diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc index 643cc60a8..e4ce2d655 100644 --- a/program/steps/addressbook/search.inc +++ b/program/steps/addressbook/search.inc @@ -88,7 +88,7 @@ $OUTPUT->send('contactsearch'); function rcmail_contact_search() { - global $RCMAIL, $OUTPUT, $CONFIG, $SEARCH_MODS_DEFAULT; + global $RCMAIL, $OUTPUT, $SEARCH_MODS_DEFAULT, $PAGE_SIZE; $adv = isset($_POST['_adv']); $sid = get_input_value('_sid', RCUBE_INPUT_GET); @@ -198,8 +198,8 @@ function rcmail_contact_search() $result = new rcube_result_set($count); // cut first-page records - if ($CONFIG['pagesize'] < $count) { - $records = array_slice($records, 0, $CONFIG['pagesize']); + if ($PAGE_SIZE < $count) { + $records = array_slice($records, 0, $PAGE_SIZE); } $result->records = array_values($records); @@ -228,7 +228,7 @@ function rcmail_contact_search() // update message count display $OUTPUT->command('set_env', 'search_request', $search_request); - $OUTPUT->command('set_env', 'pagecount', ceil($result->count / $CONFIG['pagesize'])); + $OUTPUT->command('set_env', 'pagecount', ceil($result->count / $PAGE_SIZE)); $OUTPUT->command('set_rowcount', rcmail_get_rowcount_text($result)); // Re-set current source $OUTPUT->command('set_env', 'search_id', $sid); -- cgit v1.2.3