gunnar: server/horde/horde-turba attributes.php, NONE, 1.1 ChangeLog, 1.4, 1.5 horde-turba-kolab.spec, 1.16, 1.17 sources.php, 1.3, 1.4
cvs at kolab.org
cvs at kolab.org
Mon Nov 19 20:31:29 CET 2007
- Previous message: gunnar: server/patches/horde HK-GW-framework_3.2_ALPHA-Kolab_issue_2138.patch, NONE, 1.1 HK-GW-horde_3.2_ALPHA-Deleting_categories.patch, NONE, 1.1 HK-GW-kronolith_2.2_ALPHA-Kolab_issue_2138.patch, NONE, 1.1 README_Deleting_categories.patch, NONE, 1.1 README_Kolab_issue_2138.patch, NONE, 1.1
- Next message: gunnar: server/horde/horde HK-GW-Deleting_categories.patch, NONE, 1.1 ChangeLog, 1.3, 1.4 horde-kolab.spec, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/horde/horde-turba
In directory doto:/tmp/cvs-serv5815
Modified Files:
ChangeLog horde-turba-kolab.spec sources.php
Added Files:
attributes.php
Log Message:
Fixes for kolab issues 2040 and 2135.
--- NEW FILE: attributes.php ---
<?php
/**
* Turba Attributes File.
*
* This file contains examples of attributes that Turba understands, and their
* types. It may be safely edited by hand. Use attributes.php.dist as a
* reference.
*
* The syntax of this array is as follows:<pre>
* label - The text that the user will see attached to this field.
* type - One of the following:
* - spacer - header
* - description - html
* - number - int
* - intlist - text
* - longtext - countedtext
* - address - file
* - boolean - link
* - email - emailconfirm
* - password - passwordconfirm
* - enum - multienum
* - radio - set
* - date - time
* - monthyear - monthdayyear
* - colorpicker - sorter
* - creditcard - invalid
* - stringlist - addresslink (requires Horde-3.2)
* required - Boolean whether this field is mandatory.
* readonly - Boolean whether this field is editable.
* desc - Any help text attached to the field.
* params - Any other parameters that need to be passed to the field.
* For a documentation of available field paramaters see
* http://wiki.horde.org/Doc/Dev/FormTypes.
* </pre>
*
* $Horde: turba/config/attributes.php.dist,v 1.55 2007/11/16 23:39:56 jan Exp $
*/
/* Personal stuff. */
$attributes['name'] = array(
'label' => _("Name"),
'type' => 'text',
'required' => true,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['firstname'] = array(
'label' => _("First Name"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['lastname'] = array(
'label' => _("Last Name"),
'type' => 'text',
'required' => true,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['middlenames'] = array(
'label' => _("Middle Names"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['namePrefix'] = array(
'label' => _("Name Prefixes"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 32, 'maxlength' => 32)
);
$attributes['nameSuffix'] = array(
'label' => _("Name Suffixes"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 32, 'maxlength' => 32)
);
$attributes['initials'] = array(
'label' => _("Initials"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['alias'] = array(
'label' => _("Alias"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 32)
);
$attributes['nickname'] = array(
'label' => _("Nickname"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 32, 'maxlength' => 32)
);
$attributes['birthday'] = array(
'label' => _("Birthday"),
'type' => 'monthdayyear',
'required' => false,
'params' => array('start_year' => 1900, 'end_year' => null, 'picker' => true, 'format_in' => '%Y-%m-%d', 'format_out' => '%x')
);
$attributes['anniversary'] = array(
'label' => _("Anniversary"),
'type' => 'monthdayyear',
'params' => array('start_year' => 1900, 'end_year' => null, 'picker' => true, 'format_in' => '%Y-%m-%d', 'format_out' => '%x'),
'required' => false,
);
$attributes['spouse'] = array(
'label' => _("Spouse"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['children'] = array(
'label' => _("Children"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['gender'] = array(
'label' => _("Gender"),
'type' => 'enum',
'required' => false,
'params' => array(array('', _("male"), _("female"))),
);
/* Locations, addresses. */
$attributes['homeAddress'] = array(
'label' => _("Home Address"),
'type' => 'address',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['homeStreet'] = array(
'label' => _("Home Street Address"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['homePOBox'] = array(
'label' => _("Home Post Office Box"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 10, 'maxlength' => 10)
);
$attributes['homeCity'] = array(
'label' => _("Home City"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['homeProvince'] = array(
'label' => _("Home State/Province"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['homePostalCode'] = array(
'label' => _("Home Postal Code"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 10, 'maxlength' => 10)
);
$attributes['homeCountry'] = array(
'label' => _("Home Country"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['workAddress'] = array(
'label' => _("Work Address"),
'type' => 'address',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['workStreet'] = array(
'label' => _("Work Street Address"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['workPOBox'] = array(
'label' => _("Work Post Office Box"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 10, 'maxlength' => 10)
);
$attributes['workCity'] = array(
'label' => _("Work City"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['workProvince'] = array(
'label' => _("Work State/Province"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['workPostalCode'] = array(
'label' => _("Work Postal Code"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 10, 'maxlength' => 10)
);
$attributes['workCountry'] = array(
'label' => _("Work Country"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['companyAddress'] = array(
'label' => _("Company Address"),
'type' => 'address',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['timezone'] = array(
'label' => _("Time Zone"),
'type' => 'enum',
'params' => array('values' => $GLOBALS['tz'], 'prompt' => true),
'required' => false
);
/* Communication. */
$attributes['email'] = array(
'label' => _("Email"),
'type' => 'email',
'required' => false,
'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true)
);
$attributes['emails'] = array(
'label' => _("Emails"),
'type' => 'email',
'required' => false,
'params' => array('allow_multi' => true, 'strip_domain' => false, 'link_compose' => true)
);
$attributes['homePhone'] = array(
'label' => _("Home Phone"),
'type' => 'phone',
'required' => false
);
$attributes['workPhone'] = array(
'label' => _("Work Phone"),
'type' => 'phone',
'required' => false
);
$attributes['cellPhone'] = array(
'label' => _("Mobile Phone"),
'type' => 'cellphone',
'required' => false
);
$attributes['fax'] = array(
'label' => _("Fax"),
'type' => 'phone',
'required' => false
);
$attributes['pager'] = array(
'label' => _("Pager"),
'type' => 'phone',
'required' => false
);
$attributes['instantMessenger'] = array(
'label' => _("Instant Messenger"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
/* Job, company, organization. */
$attributes['title'] = array(
'label' => _("Job Title"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['role'] = array(
'label' => _("Occupation"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['businessCategory'] = array(
'label' => _("Business Category"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['profession'] = array(
'label' => _("Profession"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['manager'] = array(
'label' => _("Manager"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['assistant'] = array(
'label' => _("Assistant"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['company'] = array(
'label' => _("Company"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['department'] = array(
'label' => _("Department"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['office'] = array(
'label' => _("Office"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
/* Other */
$attributes['notes'] = array(
'label' => _("Notes"),
'type' => 'longtext',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['website'] = array(
'label' => _("Website URL"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['freebusyUrl'] = array(
'label' => _("Freebusy URL"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['pgpPublicKey'] = array(
'label' => _("PGP Public Key"),
'type' => 'longtext',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['smimePublicKey'] = array(
'label' => _("S/MIME Public Certificate"),
'type' => 'longtext',
'required' => false,
'params' => array('rows' => 3, 'cols' => 40)
);
$attributes['language'] = array(
'label' => _("Language"),
'type' => 'text',
'required' => false,
'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255)
);
$attributes['latitude'] = array(
'label' => _("Latitude"),
'type' => 'number',
'required' => false,
);
$attributes['longitude'] = array(
'label' => _("Longitude"),
'type' => 'number',
'required' => false,
);
/* This attribute uses Horde's categories and is an example how to use an enum
* field. Don't forget to add a 'map' entry to config/sources.php if you want
* to use this attribute. */
require_once 'Horde/Prefs/CategoryManager.php';
$cManager = new Prefs_CategoryManager();
$categories = array_merge(array(_("Unfiled")), $cManager->get());
$attributes['category'] = array(
'label' => _("Category"),
'type' => 'enum',
'params' => array('values' => $categories, 'prompt' => false),
'required' => false
);
Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/horde/horde-turba/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ChangeLog 20 Jul 2007 11:19:09 -0000 1.4
+++ ChangeLog 19 Nov 2007 19:31:27 -0000 1.5
@@ -1,3 +1,10 @@
+2007-11-19 Gunnar Wrobel <p at rdus.de>
+
+ * horde-turba-kolab.spec:
+
+ kolab/issue2040 (Horde: resouces are not displayed in address book)
+ kolab/issue2135 ([horde/turba] Turba should support some more contact attributes)
+
2007-07-19 Gunnar Wrobel <p at rdus.de>
* horde-passwd-kolab.spec: Update to 20070719. Fixed patching.
Index: horde-turba-kolab.spec
===================================================================
RCS file: /kolabrepository/server/horde/horde-turba/horde-turba-kolab.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- horde-turba-kolab.spec 2 Oct 2007 14:21:34 -0000 1.16
+++ horde-turba-kolab.spec 19 Nov 2007 19:31:27 -0000 1.17
@@ -25,6 +25,7 @@
Source0: http://ftp.horde.org/pub/%{V_horde_name}/%{V_horde_name}-h3-%{V_uver}.tar.gz
Source1: conf.php
Source2: sources.php
+Source2: attributes.php
Patch0: HK-GW-Fix_notice_on_addressbook_creation.patch
Patch1: HK-GW-Fix_address_book_deletion_1.patch
@@ -87,7 +88,7 @@
cd ..
- %{l_shtool} install -c -m 644 %{l_value -s -a} %{S:1} %{S:2} \
+ %{l_shtool} install -c -m 644 %{l_value -s -a} %{S:1} %{S:2} %{S:3} \
$RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/%{V_horde_name}/config/
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
Index: sources.php
===================================================================
RCS file: /kolabrepository/server/horde/horde-turba/sources.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sources.php 2 Oct 2007 14:21:34 -0000 1.3
+++ sources.php 19 Nov 2007 19:31:27 -0000 1.4
@@ -1,6 +1,6 @@
<?php
/**
- * $Horde: turba/config/sources.php.dist,v 1.166 2007/05/23 22:08:54 wrobel Exp $
+ * $Horde: turba/config/sources.php.dist,v 1.187 2007/11/16 23:27:50 jan Exp $
*
* This file is where you specify the sources of contacts available to users
* at your installation. It contains a large number of EXAMPLES. Please
@@ -10,11 +10,11 @@
* title: This is the common (user-visible) name that you want displayed
* in the contact source drop-down box.
*
- * type: The types 'ldap', 'sql', 'imsp' and 'prefs' are currently
- * supported. Preferences-based address books are not intended
- * for production installs unless you really know what you're
- * doing - they are not searchable, and they won't scale well if
- * a user has a large number of entries.
+ * type: The types 'ldap', 'sql', 'imsp', 'group', 'favourites' and
+ * 'prefs' are currently supported. Preferences-based address
+ * books are not intended for production installs unless you
+ * really know what you're doing - they are not searchable, and
+ * they won't scale well if a user has a large number of entries.
*
* params: These are the connection parameters specific to the contact
* source. See below for examples of how to set these.
@@ -61,7 +61,8 @@
* attributes that build a valid DN.
*
* objectclass: Only applies to LDAP servers. Defines a list of
- * objectclasses that the LDAP object must be a member of.
+ * objectclasses that contacts must belong to, and
+ * that new objects will be created with.
*
* filter: Filter helps to filter your result based on certain
* condition in SQL and LDAP backends. A filter can be
@@ -70,14 +71,17 @@
* the delete flag = 0:
* 'filter' = 'deleted=0'
*
- * map: This is a list of mappings from the Turba attribute names
- * (on the left) to the attribute names by which they are known
- * in this contact source (on the right). Turba also supports
- * composite fields. A composite field is defined by mapping
- * the field name to an array containing a list of component
- * fields and a format string (similar to a printf() format
- * string). 'attribute' defines where the composed value
- * is saved, and can be left out. Here is an example:
+ * map: This is a list of mappings from the Turba attribute
+ * names (on the left) to the attribute names by which
+ * they are known in this contact source (on the
+ * right). Turba also supports composite fields. A
+ * composite field is defined by mapping the field name
+ * to an array containing a list of component fields and
+ * a format string (similar to a printf() format string;
+ * however, note that positioned parameters like %1$s
+ * will NOT work). 'attribute' defines where the composed
+ * value is saved, and can be left out. Here is an
+ * example:
* ...
* 'name' => array('fields' => array('firstname', 'lastname'),
* 'format' => '%s %s',
@@ -110,8 +114,14 @@
* search: A list of Turba attribute names that can be searched for this
* source.
*
- * strict: A list of native field/attribute names that must always be
- * matched exactly in a search.
+ * strict: A list of native field/attribute names that must
+ * always be matched exactly in a search.
+ *
+ * approximate: Only applies to LDAP servers. If set, should be an
+ * array of native field/attribute names to search
+ * "approximately" (for example, "Sánchez", "Sanchez",
+ * and "Sanchéz" will all match a search string of
+ * "sanchez").
*
* export: If set to true, this source will appear on the Export menu,
* allowing users to export the contacts to a CSV (etc.) file.
@@ -120,20 +130,485 @@
* menu item, and empty searches against the source will return
* all contacts.
*
- * use_shares: If this is present and true, Turba_Share functionality will
+ * use_shares: If this is present and true, Horde_Share functionality will
* be enabled for this source - allowing users to share their
* personal address books as well as to create new ones. Since
* Turba only supports having one backend configured for
* creating new shares, use the 'shares' configuration option to
* specify which backend will be used for creating new shares.
- * All permission checking will be done against Turba_Share, but
+ * All permission checking will be done against Horde_Share, but
* note that any 'extended' permissions (such as max_contacts)
* will still be enforced. Also note that the backend driver
* must have support for using this. Currently SQL and IMSP.
*
+ * list_name_field: If this is present and non-empty, it will be taken as the
+ * name of the turba field to store contact list names in.
+ * This is required when using a composite field as the 'name'
+ * field.
* Here are some example configurations:
*/
+/**
+ * A local address book in an LDAP directory. This implements a public
+ * (shared) address book.
+ *
+ * To store distribution lists in the LDAP directory, you'll need to include
+ * horde/scripts/ldap/horde.schema in your LDAP configuration.
+ *
+ * To store freebusy information in the LDAP directory, you'll need to include
+ * turba/scripts/ldap/rfc2739.schema in your LDAP configuration.
+ */
+// $cfgSources['localldap'] = array(
+// 'title' => _("Shared Directory"),
+// 'type' => 'ldap',
+// 'params' => array(
+// 'server' => 'ldap.example.com',
+// 'port' => 389,
+// 'tls' => false,
+// 'root' => 'dc=example,dc=com',
+// 'bind_dn' => 'cn=admin,ou=users,dc=example,dc=com',
+// 'bind_password' => '********',
+// 'sizelimit' => 200,
+// 'dn' => array('cn'),
+// 'objectclass' => array('top',
+// 'person',
+// 'organizationalPerson',
+// 'inetOrgPerson'),
+// 'scope' => 'one',
+// 'charset' => 'iso-8859-1',
+// // Consult the LDAP schema to verify that all required attributes for
+// // an entry are set and add them if needed.
+// 'checkrequired' => false,
+// // Value used to fill in missing required attributes.
+// 'checkrequired_string' => ' ',
+// // Check LDAP schema for valid syntax. If this is false an address
+// // field is assumed to have postalAddress syntax; otherwise the schema
+// // is consulted for the syntax to use.
+// 'checksyntax' => false,
+// 'version' => 3
+// ),
+// 'map' => array(
+// '__key' => 'dn',
+// '__uid' => 'uid',
+//
+// // From horde.schema:
+// // '__type' => 'turbaType',
+// // '__members' => 'turbaMembers'
+//
+// 'name' => 'cn',
+// 'email' => 'mail',
+// 'homePhone' => 'homephone',
+// 'workPhone' => 'telephonenumber',
+// 'cellPhone' => 'mobiletelephonenumber',
+// 'homeAddress' => 'homepostaladdress',
+//
+// // From rfc2739.schema:
+// // 'freebusyUrl' => 'calFBURL',
+// ),
+// 'search' => array(
+// 'name',
+// 'email',
+// 'homePhone',
+// 'workPhone',
+// 'cellPhone',
+// 'homeAddress'
+// ),
+// 'strict' => array(
+// 'dn',
+// ),
+// 'approximate' => array(
+// 'cn',
+// ),
+// 'export' => true,
+// 'browse' => true,
+// );
+
+/**
+ * A personal LDAP address book. This assumes that the login is
+ * <username>@domain.com and that the users are stored on the same LDAP
+ * server. Thus it is possible to bind with the username and password from the
+ * user. For more info; please refer to the docs/LDAP file in the Turba
+ * distribution.
+ *
+ * To store distribution lists in the LDAP directory, you'll need to include
+ * horde/scripts/ldap/horde.schema in your LDAP configuration.
+ *
+ * To store freebusy information in the LDAP directory, you'll need to include
+ * turba/scripts/ldap/rfc2739.schema in your LDAP configuration.
+ */
+/* First we need to get the uid. */
+// $_ldap_uid = Auth::getBareAuth();
+// $_ldap_basedn = 'dc=example,dc=com';
+// $cfgSources['personal_ldap'] = array(
+// 'title' => _("My Address Book"),
+// 'type' => 'ldap',
+// 'params' => array(
+// 'server' => 'localhost',
+// 'tls' => false,
+// 'root' => 'ou=' . $_ldap_uid . ',ou=personal_addressbook,' . $_ldap_basedn,
+// 'bind_dn' => 'uid=' . $_ldap_uid . ',ou=People,' . $_ldap_basedn,
+// 'bind_password' => Auth::getCredential('password'),
+// 'dn' => array('cn', 'uid'),
+// 'objectclass' => array('top',
+// 'person',
+// // 'turbaContact',
+// 'inetOrgPerson',
+// // 'calEntry',
+// 'organizationalPerson'),
+// 'scope' => 'one',
+// 'charset' => 'utf-8',
+// 'version' => 3
+// ),
+// 'map' => array(
+// '__key' => 'dn',
+// '__uid' => 'uid',
+//
+// // From horde.schema:
+// // '__type' => 'turbaType',
+// // '__members' => 'turbaMembers'
+//
+// 'name' => 'cn',
+// 'email' => 'mail',
+// 'lastname' => 'sn',
+// 'title' => 'title',
+// 'company' => 'organizationname',
+// 'businessCategory' => 'businesscategory',
+// 'workAddress' => 'postaladdress',
+// 'workPostalCode' => 'postalcode',
+// 'workPhone' => 'telephonenumber',
+// 'fax' => 'facsimiletelephonenumber',
+// 'homeAddress' => 'homepostaladdress',
+// 'homePhone' => 'homephone',
+// 'cellPhone' => 'mobile',
+// 'notes' => 'description',
+//
+// // Evolution interopt attributes: (those that do not require the
+// // evolution.schema)
+// 'office' => 'roomNumber',
+// 'department' => 'ou',
+// 'nickname' => 'displayName',
+// 'website' => 'labeledURI',
+//
+// // These are not stored on the LDAP server.
+// 'pgpPublicKey' => 'object_pgppublickey',
+// 'smimePublicKey' => 'object_smimepublickey',
+//
+// // From rfc2739.schema:
+// // 'freebusyUrl' => 'calFBURL',
+// ),
+// 'search' => array(
+// 'name',
+// 'email',
+// 'businessCategory',
+// 'title',
+// 'homePhone',
+// 'workPhone',
+// 'cellPhone',
+// 'homeAddress'
+// ),
+// 'strict' => array(
+// 'dn',
+// ),
+// 'approximate' => array(
+// 'cn',
+// ),
+// 'export' => true,
+// 'browse' => true,
+// );
+
+/**
+ * Public netcenter and verisign LDAP directories.
+ */
+// $cfgSources['netcenter'] = array(
+// 'title' => _("Netcenter Member Directory"),
+// 'type' => 'ldap',
+// 'params' => array(
+// 'server' => 'memberdir.netscape.com',
+// 'port' => 389,
+// 'tls' => false,
+// 'root' => 'ou=member_directory,o=netcenter.com',
+// 'dn' => array('cn'),
+// 'objectclass' => 'person',
+// 'filter' => '',
+// 'scope' => 'sub',
+// 'charset' => 'iso-8859-1'
+// ),
+// 'map' => array(
+// '__key' => 'dn',
+// 'name' => 'cn',
+// 'email' => 'mail',
+// 'alias' => 'givenname'
+// ),
+// 'search' => array(
+// 'name',
+// 'email',
+// 'alias'
+// ),
+// 'strict' => array(
+// 'dn'
+// ),
+// 'approximate' => array(
+// 'cn',
+// ),
+// 'export' => false,
+// 'browse' => false,
+// );
+//
+// $cfgSources['verisign'] = array(
+// 'title' => _("Verisign Directory"),
+// 'type' => 'ldap',
+// 'params' => array(
+// 'server' => 'directory.verisign.com',
+// 'port' => 389,
+// 'tls' => false,
+// 'root' => '',
+// 'scope' => 'sub',
+// 'charset' => 'iso-8859-1'
+// ),
+// 'map' => array(
+// '__key' => 'dn',
+// 'name' => 'cn',
+// 'email' => 'mail'
+// ),
+// 'search' => array(
+// 'name',
+// 'email'
+// ),
+// 'strict' => array(
+// 'dn'
+// ),
+// 'approximate' => array(
+// 'cn',
+// ),
+// 'export' => false,
+// 'browse' => false,
+// );
+
+/**
+ * A preferences-based address book. This will always be private. You can add
+ * any attributes you like to the map and it will just work; you can also
+ * create multiple prefs-based address books by changing the 'name' parameter.
+ * This is best for address books that are expected to remain small; it's not
+ * the most efficient, but it can't be beat for getting up and running
+ * quickly, especially if you already have Horde preferences working. Note
+ * that it is not searchable, though - searches will simply return the whole
+ * address book.
+ */
+// $cfgSources['prefs'] = array(
+// 'title' => _("Private Address Book"),
+// 'type' => 'prefs',
+// 'params' => array(
+// 'name' => 'prefs',
+// 'charset' => NLS::getCharset()
+// ),
+// 'map' => array(
+// '__key' => 'id',
+// '__type' => '_type',
+// '__members' => '_members',
+// '__uid' => 'uid',
+// 'name' => 'name',
+// 'email' => 'mail',
+// 'alias' => 'alias'
+// ),
+// 'search' => array(
+// 'name',
+// 'email',
+// 'alias'
+// ),
+// 'strict' => array(
+// 'id',
+// '_type',
+// ),
+// 'export' => true,
+// 'browse' => true,
+// );
+
+/**
+ * This source creates an address book for each group the current user is a
+ * member in. The address book will always be read only, and the group members
+ * must have an email address entered in their default identity. No email
+ * address will result in that member not being included in the address book.
+ */
+//$grpSource = array(
+// 'title' => _("Group"),
+// 'type' => 'group',
+// 'params' => array(
+// 'name' => ''
+// ),
+// 'map' => array(
+// '__key' => 'email',
+// 'name' => 'name',
+// 'email' => 'email'
+// ),
+// 'search' => array(
+// 'name',
+// 'email'
+// ),
+// 'export' => true,
+// 'browse' => true,
+//);
+
+//require_once 'Horde/Group.php';
+//$_group_driver = &Group::singleton();
+//$_group_list = $_group_driver->getGroupMemberships(Auth::getAuth());
+//foreach ($_group_list as $_group_id => $_group_name) {
+// $cfgSources['group_' . $_group_id] = $grpSource;
+// $cfgSources['group_' . $_group_id]['params'] = array('gid' => $_group_id);
+// $cfgSources['group_' . $_group_id]['title'] = $_group_name;
+//}
+
+/**
+ * IMSP based address book.
+ *
+ * Communicates with an IMSP backend server.
+ *
+ * Notes:
+ * You should configure the user's "main" address book here. The name of the
+ * address book is set in the 'name' element of the params array. It should
+ * be configured to be the same as the IMSP server username. Any other
+ * address books the user has access to will automatically be configured at
+ * runtime.
+ *
+ * In the params array, accepted values for auth_method are 'cram_md5',
+ * 'imtest', and 'plaintext' - these must match a IMSP_Auth_ driver. If you
+ * are using the imtest driver for Cyrus, please read the
+ * framework/Net_IMSP/Auth/imtest.php file for more configuration information.
+ *
+ * Groups in other IMSP-aware applications are just entries with multiple
+ * email addresses in the email field and a 'group' field set to flag the
+ * entry as a group. (The Cyrusoft applications, Mulberry and Silkymail both
+ * use a field named 'group' set to equal 'group' to signify this). A
+ * Turba_Object_Group is basically a List of existing Turba_Objects. The IMSP
+ * driver will map between these two structures when reading and writing
+ * groups.
+ * The only caveat is that IMSP groups that contain email addresses which do
+ * not have a cooresponding contact entry will be ignored. The group_id_field
+ * should be set to the IMSP field that flags the entry as a 'group' entry and
+ * the group_id_value should be set to the value given to that field.
+ *
+ * By default, the username and password that were used to login to Horde is
+ * used to login to the IMSP server. If these credentials are different,
+ * there is a user preference in Horde to allow another username / password to
+ * be entered. The alternate credentials are always used if present.
+ *
+ * In the map array, since IMSP uses the 'name' attribute as a key, this is
+ * what __key is mapped to ... and a dynamic field 'fullname' is added and
+ * mapped to the horde 'name' field. This is populated with the IMSP 'name'
+ * field when the object is read from the server.
+ *
+ * If you wish to keep track of ownership of individual contacts, set
+ * 'contact_ownership' = true. Note that entries created using other clients
+ * will not be created this way and will therefore have no 'owner'. Set
+ * 'contact_ownership' = false and the __owner field will be automatically
+ * populated with the current username.
+ *
+ * To integrate with Horde_Share (requires Horde 3.2 or better) set use_shares
+ * to true, and uncomment the IMSP Horde_Share hooks in horde/config/hooks.php.
+ */
+// Check that IMSP is configured in Horde but fall through if there is no
+// configuration at all - in case we don't have at least a 3.0.6 Horde
+// install. (In that case, be sure to change the params array below to suit
+// your needs.
+if (!empty($GLOBALS['conf']['imsp']['enabled']) ||
+ !isset($GLOBALS['conf']['imsp']['enabled'])) {
+ // First, get the user name to login to IMSP server with.
+ $_imsp_auth_user = $GLOBALS['prefs']->getValue('imsp_auth_user');
+ $_imsp_auth_pass = $GLOBALS['prefs']->getValue('imsp_auth_pass');
+ if (!strlen($_imsp_auth_user)) {
+ $_imsp_auth_user = Auth::getBareAuth();
+ $_imsp_auth_pass = Auth::getCredential('password');
+ }
+ $cfgSources['imsp'] = array(
+ 'title' => _("IMSP"),
+ 'type' => 'imsp',
+ 'params' => array(
+ 'server' => $GLOBALS['conf']['imsp']['server'],
+ 'port' => $GLOBALS['conf']['imsp']['port'],
+ 'auth_method' => $GLOBALS['conf']['imsp']['auth_method'],
+ // socket, command, and auth_mechanism are for imtest driver.
+ 'socket' => isset($GLOBALS['conf']['imsp']['socket']) ?
+ $GLOBALS['conf']['imsp']['socket'] . $_imsp_auth_user . '.sck' :
+ '',
+ 'command' => isset($GLOBALS['conf']['imsp']['command']) ?
+ $GLOBALS['conf']['imsp']['command'] : '' ,
+ 'auth_mechanism' => isset($GLOBALS['conf']['imsp']['auth_mechanism']) ?
+ $GLOBALS['conf']['imsp']['auth_mechanism'] : '',
+ 'username' => $_imsp_auth_user,
+ 'password' => $_imsp_auth_pass,
+ 'name' => $_imsp_auth_user,
+ 'group_id_field' => 'group',
+ 'group_id_value' => 'group',
+ 'contact_ownership' => false,
+ // Dynamically generated acl rights for current user.
+ 'my_rights' => '',
+ ),
+ 'map' => array(
+ '__key' => 'name',
+ '__type' => '__type',
+ '__members' => '__members',
+ '__owner' => '__owner',
+ '__uid' => '__uid',
+ 'email' => 'email',
+ 'alias' => 'alias',
+ 'company' => 'company',
+ 'notes' => 'notes',
+ 'workPhone' => 'phone-work',
+ 'fax' => 'fax',
+ 'homePhone' => 'phone-home',
+ 'cellPhone' => 'cellphone',
+ 'freebusyUrl' => 'freebusyUrl'
+ ),
+ 'search' => array(
+ 'name',
+ 'email',
+ 'alias',
+ 'company',
+ 'homePhone'
+ ),
+ 'strict' => array(),
+ 'export' => true,
+ 'browse' => true,
+ 'use_shares' => false,
+ );
+
+ /**
+ * Get any other address books this user might be privy to.
+ * The values for attributes such as 'export' and 'browse' for books
+ * that are added below will be the same as the values set in the default
+ * book above. Any entries defined explicitly in cfgSources[]
+ * will override any entries gathered dynamically below.
+ */
+ if (empty($cfgSources['imsp']['use_shares'])) {
+ require_once 'Net/IMSP/Utils.php';
+ $result = Net_IMSP_Utils::getAllBooks($cfgSources['imsp']);
+
+ if (!is_a($result, 'PEAR_Error')) {
+ $resultCount = count($result);
+ for ($i = 0; $i < $resultCount; $i++) {
+ // Make sure we didn't define this source explicitly,
+ // but set the acls from the server regardless.
+ $dup = false;
+ foreach ($cfgSources as $key => $thisSource) {
+ if (($thisSource['type'] == 'imsp') &&
+ ($thisSource['params']['name'] == $result[$i]['params']['name'])) {
+
+ $dup = true;
+ $acl = $result[$i]['params']['my_rights'];
+ $cfgSources[$key]['params']['my_rights'] = $acl;
+ break;
+ }
+ }
+ if (!$dup) {
+ $cfgSources[$result[$i]['params']['name']] = $result[$i];
+ }
+ }
+ } else {
+ $notification->push($result);
+ }
+ }
+}
+/* End IMSP sources. */
+
/* Begin Kolab sources. */
if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
@@ -142,9 +617,9 @@
require_once 'Horde/Kolab.php';
if (!is_callable('Kolab', 'getServer')) {
- $server = $GLOBALS['conf']['kolab']['ldap']['server'];
+ $_kolab_server = $GLOBALS['conf']['kolab']['ldap']['server'];
} else {
- $server = Kolab::getServer('ldap');
+ $_kolab_server = Kolab::getServer('ldap');
}
/* A global address book for a Kolab Server. This is typically a
@@ -155,7 +630,7 @@
'title' => _("Global Address Book"),
'type' => 'ldap',
'params' => array(
- 'server' => $server,
+ 'server' => $_kolab_server,
'port' => $GLOBALS['conf']['kolab']['ldap']['port'],
'tls' => false,
'root' => $GLOBALS['conf']['kolab']['ldap']['basedn'],
@@ -164,12 +639,11 @@
'objectclass' => array(
'inetOrgPerson'
),
- 'scope' => 'one',
+ 'scope' => 'sub',
'charset' => 'utf-8',
'version' => 3,
'bind_dn' => '',
'bind_password' => '',
- 'read_only' => true,
),
'map' => array(
'__key' => 'dn',
@@ -231,19 +705,24 @@
),
'map' => array(
'__key' => 'uid',
- 'name' => 'full-name',
+ '__uid' => 'uid',
+ /* Personal */
+ 'name' => array('fields' => array('firstname', 'middlenames', 'lastname'),
+ 'format' => '%s %s %s',
+ 'attribute' => 'full-name'),
'firstname' => 'given-name',
'lastname' => 'last-name',
- 'title' => 'job-title',
- 'company' => 'organization',
- 'notes' => 'body',
- 'website' => 'web-page',
- 'nickname' => 'nick-name',
- 'emails' => 'emails',
- 'homePhone' => 'phone-home1',
- 'workPhone' => 'phone-business1',
- 'cellPhone' => 'phone-mobile',
- 'fax' => 'phone-businessfax',
+ 'middlenames' => 'middle-names',
+ 'namePrefix' => 'prefix',
+ 'nameSuffix' => 'suffix',
+ 'initials' => 'initials',
+ 'alias' => 'nick-name',
+ 'gender' => 'gender',
+ 'birthday' => 'birthday',
+ 'spouse' => 'spouse-name',
+ 'anniversary' => 'anniversary',
+ 'children' => 'children',
+ /* Location */
'workStreet' => 'addr-business-street',
'workCity' => 'addr-business-locality',
'workProvince' => 'addr-business-region',
@@ -254,19 +733,62 @@
'homeProvince' => 'addr-home-region',
'homePostalCode' => 'addr-home-postal-code',
'homeCountry' => 'addr-home-country',
+ /* Communications */
+ 'emails' => 'emails',
+ 'homePhone' => 'phone-home1',
+ 'workPhone' => 'phone-business1',
+ 'cellPhone' => 'phone-mobile',
+ 'fax' => 'phone-businessfax',
+ 'instantMessenger' => 'im-address',
+ /* Organization */
+ 'title' => 'job-title',
+ 'role' => 'profession',
+ 'company' => 'organization',
+ 'department' => 'department',
+ 'office' => 'office-location',
+ 'manager' => 'manager-name',
+ 'assistant' => 'assistant',
+ /* Other */
+ 'category' => 'categories',
+ 'notes' => 'body',
+ 'website' => 'web-page',
+ 'freebusyUrl' => 'free-busy-url',
+ 'language' => 'language',
+ 'latitude' => 'latitude',
+ 'longitude' => 'longitude',
+ // MISSING: picture, sensitivity
+ ),
+ 'tabs' => array(
+ _("Personal") => array('name', 'firstname', 'lastname', 'middlenames',
+ 'namePrefix', 'nameSuffix', 'initials', 'alias',
+ 'gender', 'birthday', 'spouse', 'anniversary',
+ 'children'),
+ _("Location") => array('homeStreet', 'homeCity', 'homeProvince',
+ 'homePostalCode', 'homeCountry', 'workStreet',
+ 'workCity', 'workProvince', 'workPostalCode',
+ 'workCountry'),
+ _("Communications") => array('emails', 'homePhone', 'workPhone',
+ 'cellPhone', 'fax', 'instantMessenger'),
+ _("Organization") => array('title', 'role', 'company', 'department',
+ 'office', 'manager', 'assistant'),
+ _("Other") => array('category', 'notes', 'website', 'freebusyUrl',
+ 'language', 'latitude', 'longitude'),
),
'search' => array(
- 'name',
+ /* Personal */
'firstname',
'lastname',
- 'emails',
- 'title',
- 'company',
- 'notes',
- 'homePhone',
- 'workPhone',
- 'cellPhone',
- 'fax',
+ 'middlenames',
+ 'namePrefix',
+ 'nameSuffix',
+ 'initials',
+ 'alias',
+ 'gender',
+ 'birthday',
+ 'spouse',
+ 'anniversary',
+ 'children',
+ /* Location */
'workStreet',
'workCity',
'workProvince',
@@ -277,8 +799,26 @@
'homeProvince',
'homePostalCode',
'homeCountry',
+ /* Communications */
+ 'emails',
+ 'homePhone',
+ 'workPhone',
+ 'cellPhone',
+ 'fax',
+ 'instantMessenger',
+ /* Organization */
+ 'title',
+ 'role',
+ 'company',
+ 'department',
+ 'office',
+ 'manager',
+ 'assistant',
+ /* Other */
+ 'category',
+ 'notes',
'website',
- 'nickname'
+ 'language',
),
'strict' => array(
'uid',
- Previous message: gunnar: server/patches/horde HK-GW-framework_3.2_ALPHA-Kolab_issue_2138.patch, NONE, 1.1 HK-GW-horde_3.2_ALPHA-Deleting_categories.patch, NONE, 1.1 HK-GW-kronolith_2.2_ALPHA-Kolab_issue_2138.patch, NONE, 1.1 README_Deleting_categories.patch, NONE, 1.1 README_Kolab_issue_2138.patch, NONE, 1.1
- Next message: gunnar: server/horde/horde HK-GW-Deleting_categories.patch, NONE, 1.1 ChangeLog, 1.3, 1.4 horde-kolab.spec, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list