Hello all,

I have published a small and unobtrusive patch on the wiki, to allow people who uses LDAP address book to add more fields from inetorg person schema.

The default fields are not changed: name,firstname,surname,email. However, it's possible to use extra fields by using this configuration into the config file:

{{{
$rcmail_config['addressbook_fields'] = array('name', 'firstname', 'surname', 'email' , 'telephoneNumber', 'mobile', 'o');
}}}

Basically, the patch modify three files save.inc, show.inc and edit.inc in the folder roundcubemail/program/steps/addressbook/, and the modification looks like that:

-  $a_show_cols = array('name', 'firstname', 'surname', 'email');
+  $abook_def_fields = array('name', 'firstname', 'surname', 'email');
+  $a_show_cols = $RCMAIL->config->get('addressbook_fields', $abook_def_fields) ;

The patch also contains three labels for telephoneNumber, mobile and o:

+$labels['o'] = 'Company';
+$labels['telephoneNumber'] = 'Telephone number';
+$labels['mobile'] = 'Mobile';

Of course, a more complete labels should use at least inetorgperson's schema:
- commonName
- givenName
- surname
- mail
- organizationName or 'o'
- postOfficeBox
- postalAddress
- localityName or 'l'
- st
- postalCode
- telephoneNumber
- facsimileTelephoneNumber
- mobile
- homePhone

I'll create a more complete patch for the version 0.4, but I think this small patch will be very useful to lot of roundcube users, particularly in enterprises. I hope it's possible to include this patch in the version 0.3.

The link to the entry : http://trac.roundcube.net/ticket/1485907

André