summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/list.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-07-26 17:18:38 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-07-26 17:18:38 +0200
commitbaecd8becccd7786632c1cda895123293ceb1408 (patch)
treee33c882fe684e73fab73d77b1b16fe54ce9754ec /program/steps/addressbook/list.inc
parent5bc1233de808442f8d412bf4394fda05b22f41d2 (diff)
Move the hard-coded list of fields used to list contacts to a central location
Diffstat (limited to 'program/steps/addressbook/list.inc')
-rw-r--r--program/steps/addressbook/list.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc
index a24fb9520..06a1e10a3 100644
--- a/program/steps/addressbook/list.inc
+++ b/program/steps/addressbook/list.inc
@@ -19,6 +19,8 @@
+-----------------------------------------------------------------------+
*/
+$afields = $RCMAIL->config->get('contactlist_fields');
+
// Use search result
if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
{
@@ -43,7 +45,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search
$source->set_search_set($set);
// get records
- $result = $source->list_records(array('name', 'firstname', 'surname', 'email'));
+ $result = $source->list_records($afields);
while ($row = $result->next()) {
$row['sourceid'] = $s;
@@ -73,7 +75,7 @@ else {
$CONTACTS = rcmail_contact_source(null, true);
// get contacts for this user
- $result = $CONTACTS->list_records(array('name', 'firstname', 'surname', 'email'));
+ $result = $CONTACTS->list_records($afields);
if (!$result->count && $result->searchonly) {
$OUTPUT->show_message('contactsearchonly', 'notice');