From a61ccea31aeef274535c420831e4b8ce2c98a7e0 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 30 Dec 2011 02:20:53 -0500
Subject: [PATCH] - Small fixes to r5662

---
 program/steps/settings/func.inc |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 91543ec..2050b93 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -367,13 +367,15 @@
     }
 
     // show page size selection
-    if (!isset($no_override['pagesize'])) {
-      $field_id = 'rcmfd_pagesize';
-      $input_pagesize = new html_inputfield(array('name' => '_pagesize', 'id' => $field_id, 'size' => 5));
+    if (!isset($no_override['mail_pagesize'])) {
+      $field_id = 'rcmfd_mail_pagesize';
+      $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'id' => $field_id, 'size' => 5));
+
+      $size = intval($config['mail_pagesize'] ? $config['mail_pagesize'] : $config['pagesize']);
 
       $blocks['main']['options']['pagesize'] = array(
         'title' => html::label($field_id, Q(rcube_label('pagesize'))),
-        'content' => $input_pagesize->show($config['pagesize']),
+        'content' => $input_pagesize->show($size ? $size : 50),
       );
     }
 
@@ -694,11 +696,11 @@
       $field_id = 'rcmfd_addressbook_pagesize';
       $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'id' => $field_id, 'size' => 5));
 
-      $size = $config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize'];
+      $size = intval($config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize']);
 
       $blocks['main']['options']['pagesize'] = array(
         'title' => html::label($field_id, Q(rcube_label('pagesize'))),
-        'content' => $input_pagesize->show((int)$size),
+        'content' => $input_pagesize->show($size ? $size : 50),
       );
     }
 

--
Gitblit v1.9.1