Skip to content

Commit

Permalink
Fix so contactlist_fields option can be set via config file
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Mar 18, 2016
1 parent 4d3f055 commit 7c04110
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -14,6 +14,7 @@ CHANGELOG Roundcube Webmail
- Hide DSN option in Preferences when smtp_server is not used (#1490666)
- Protect download urls against CSRF using unique request tokens (#1490642)
- newmail_notifier: Refactor desktop notifications
- Fix so contactlist_fields option can be set via config file

RELEASE 1.1.4
-------------
Expand Down
4 changes: 4 additions & 0 deletions config/defaults.inc.php
Expand Up @@ -936,6 +936,10 @@
// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
$config['addressbook_search_mode'] = 0;

// List of fields used on contacts list and for autocompletion searches
// Warning: These are field names not LDAP attributes (see 'fieldmap' setting)!
$config['contactlist_fields'] = array('name', 'firstname', 'surname', 'email');

// Template of contact entry on the autocompletion list.
// You can use contact fields as: name, email, organization, department, etc.
// See program/steps/addressbook/func.inc for a list
Expand Down
7 changes: 4 additions & 3 deletions program/lib/Roundcube/rcube_config.php
Expand Up @@ -87,9 +87,10 @@ public function __construct($env = '')
$this->load();

// Defaults, that we do not require you to configure,
// but contain information that is used in various
// locations in the code:
$this->set('contactlist_fields', array('name', 'firstname', 'surname', 'email'));
// but contain information that is used in various locations in the code:
if (empty($this->prop['contactlist_fields'])) {
$this->set('contactlist_fields', array('name', 'firstname', 'surname', 'email'));
}
}

/**
Expand Down

0 comments on commit 7c04110

Please sign in to comment.