From 43875379d5fcfc4e4d29e2edcbbed614a2050f7d Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 2 Feb 2012 22:18:10 +0000 Subject: Allow users to choose cols for contacts list sorting --- program/steps/addressbook/list.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/steps/addressbook/list.inc') 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); -- cgit v1.2.3