summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-02-02 22:18:10 +0000
committerthomascube <thomas@roundcube.net>2012-02-02 22:18:10 +0000
commit43875379d5fcfc4e4d29e2edcbbed614a2050f7d (patch)
tree2679484edd2b05012c56eb01d6bfc8ff67916328 /program/include/rcube_ldap.php
parentfd6f6e27c4c727c1485674147e997eb9ce6118d6 (diff)
Allow users to choose cols for contacts list sorting
Diffstat (limited to 'program/include/rcube_ldap.php')
-rw-r--r--program/include/rcube_ldap.php26
1 files changed, 7 insertions, 19 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 0d7b7d5c2..c3893d84c 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -4,7 +4,7 @@
| program/include/rcube_ldap.php |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2006-2011, The Roundcube Dev Team |
+ | Copyright (C) 2006-2012, The Roundcube Dev Team |
| Copyright (C) 2011, Kolab Systems AG |
| |
| Licensed under the GNU General Public License version 3 or |
@@ -38,8 +38,6 @@ class rcube_ldap extends rcube_addressbook
public $readonly = true;
public $ready = false;
public $group_id = 0;
- public $list_page = 1;
- public $page_size = 10;
public $coltypes = array();
/** private properties */
@@ -50,7 +48,6 @@ class rcube_ldap extends rcube_addressbook
protected $filter = '';
protected $result = null;
protected $ldap_result = null;
- protected $sort_col = '';
protected $mail_domain = '';
protected $debug = false;
@@ -417,24 +414,15 @@ class rcube_ldap extends rcube_addressbook
/**
- * Set internal list page
+ * Set internal sort settings
*
- * @param number $page Page number to list
+ * @param string $sort_col Sort column
+ * @param string $sort_order Sort order
*/
- function set_page($page)
+ function set_sort_order($sort_col, $sort_order = null)
{
- $this->list_page = (int)$page;
- }
-
-
- /**
- * Set internal page size
- *
- * @param number $size Number of messages to display on one page
- */
- function set_pagesize($size)
- {
- $this->page_size = (int)$size;
+ if ($this->fieldmap[$sort_col])
+ $this->sort_col = $this->fieldmap[$sort_col];
}