summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/search.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-29 09:35:01 +0000
committeralecpl <alec@alec.pl>2011-12-29 09:35:01 +0000
commit08ffd939a7530c44cd68b455f75175f79698073c (patch)
treeff3d5dcfef837d47e2a9b5873ef4a864f9da0e4a /program/steps/addressbook/search.inc
parent81c2ce9b7b670b05de21f5dcc4be50b70c12fcfc (diff)
- Add separate pagesize setting for mail messages and contacts (#1488269)
Diffstat (limited to 'program/steps/addressbook/search.inc')
-rw-r--r--program/steps/addressbook/search.inc8
1 files changed, 4 insertions, 4 deletions
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);