diff options
author | thomascube <thomas@roundcube.net> | 2012-02-02 22:18:10 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2012-02-02 22:18:10 +0000 |
commit | 43875379d5fcfc4e4d29e2edcbbed614a2050f7d (patch) | |
tree | 2679484edd2b05012c56eb01d6bfc8ff67916328 /program/steps/addressbook/list.inc | |
parent | fd6f6e27c4c727c1485674147e997eb9ce6118d6 (diff) |
Allow users to choose cols for contacts list sorting
Diffstat (limited to 'program/steps/addressbook/list.inc')
-rw-r--r-- | program/steps/addressbook/list.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc index 46651853c..de7149bce 100644 --- a/program/steps/addressbook/list.inc +++ b/program/steps/addressbook/list.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/list.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2007, The Roundcube Dev Team | + | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -34,6 +34,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search $page = isset($_SESSION['page']) ? $_SESSION['page'] : 1; $_SESSION['page'] = $page; + $sort_col = $this->config->get('addressbook_sort_col', 'name'); // Get records from all sources foreach ($search as $s => $set) { @@ -49,7 +50,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search while ($row = $result->next()) { $row['sourceid'] = $s; - $key = $row['name'] . ':' . $row['sourceid']; + $key = $row[$sort_col] . ':' . $row['sourceid']; $records[$key] = $row; } unset($result); |