[dev] Fwd: how to debug address completion?

Sebastian Birnbach birnbacs at gmail.com
Wed Sep 14 13:49:27 UTC 2016


2016-09-14 15:03 GMT+02:00 Michael J Rubinsky <mrubinsk at horde.org>:

>
> [...]
>

>
What does your turba backends configuration look like for the address book
> in question? I.e., what email fields are configured?
>


Nothing fancy, just a slight variation of the default. Here is my
backends.local.php:


<?php

/**
 * A local address book in an SQL database. This implements a private
 * per-user address book. Sharing of this source with other users may be
 * accomplished by enabling Horde_Share for this source by setting
 * 'use_shares' => true.
 *
 * Be sure to create a turba_objects table in your Horde database from the
 * schema in turba/scripts/db/turba.sql if you use this source.
 */
$cfgSources['localsql'] = array(
    // ENABLED by default
    'disabled' => false,
    'title' => _("Shared Address Books"),
    'type' => 'sql',
    'params' => array(
        // The default connection details are pulled from the Horde-wide SQL
        // connection configuration.
        // To use another DB connection, you must provide configuration
        // information here - for example,
        //'sql' => array(
        //    'persistent' => false,
        //    'username' => 'horde',
        //    'password' => 'secret',
        //    'socket' => '/var/run/mysqld/mysqld.sock',
        //    'protocol' => 'unix',
        //    'database' => 'horde',
        //    'charset' => 'utf-8',
        //    'ssl' => false,
        //    'splitread' => false,
        //    'phptype' => 'mysql'
        //),
        'table' => 'turba_objects'
    ),
    'map' => array(
        '__key' => 'object_id',
        //'__owner' => 'owner_id', // removed 2015-04-24 to permit
all-users-access
        '__type' => 'object_type',
        '__members' => 'object_members',
        '__uid' => 'object_uid',
        'firstname' => 'object_firstname',
        'lastname' => 'object_lastname',
        //'middlenames' => 'object_middlenames',
        'namePrefix' => 'object_nameprefix',
        'nameSuffix' => 'object_namesuffix',
        'name' => array('fields' => array('namePrefix', 'firstname',
                                          'lastname',
                                          'nameSuffix'),
                        'format' => '%s %s %s, %s',
                        'parse' => array(
                            array('fields' => array('firstname',
                                                    'lastname'),
                                  'format' => '%s %s'),
                            array('fields' => array('firstname',
'lastname'),
                                  'format' => '%s %s'))),
        // This is a shorter version of a "name" composite field which only
        // consists of the first name and last name.
        // 'name' => array('fields' => array('firstname', 'lastname'),
        //                 'format' => '%s %s'),
        //'alias' => 'object_alias',
        //'yomifirstname' => 'object_yomifirstname',
        //'yomilastname' => 'object_yomilastname',
        //'birthday' => 'object_bday',
        //'anniversary' => 'object_anniversary',
        //'spouse' => 'object_spouse',
        //'photo' => 'object_photo',
        //'phototype' => 'object_phototype',
        'homeStreet' => 'object_homestreet',
        //'homePOBox' => 'object_homepob',
        'homeCity' => 'object_homecity',
        //'homeProvince' => 'object_homeprovince',
        'homePostalCode' => 'object_homepostalcode',
        'homeCountry' => 'object_homecountry',
        'homeAddress' => array('fields' => array('homeStreet',
'homePostalCode', 'homeCity', 'homeCountry'),
                               'format' => "%s\n%s %s\n%s"),
        'workStreet' => 'object_workstreet',
        'workPOBox' => 'object_workpob',
        'workCity' => 'object_workcity',
        //'workProvince' => 'object_workprovince',
        'workPostalCode' => 'object_workpostalcode',
        'workCountry' => 'object_workcountry',
        'workAddress' => array('fields' => array('workStreet',
'workPostalCode', 'workCity', 'workCountry'),
                               'format' => "%s\n%s %s\n%s"),
        //'otherStreet' => 'object_otherstreet',
        //'otherPOBox' => 'object_otherpob',
        //'otherCity' => 'object_othercity',
        //'otherProvince' => 'object_otherprovince',
        //'otherPostalCode' => 'object_otherpostalcode',
        //'otherCountry' => 'object_othercountry',
        /*'otherAddress' => array('fields' => array('otherStreet',
'otherCity',
                                                  'otherProvince',
                                                  'otherPostalCode'),
                                'format' => "%s\n%s, %s  %s"), */
        'department' => 'object_department',
        'manager' => 'object_manager',
        'assistant' => 'object_assistant',
        'timezone' => 'object_tz',
        //'email' => 'object_email',
        'homeEmail' => 'object_homeemail',
        'workEmail' => 'object_workemail',
        'homePhone' => 'object_homephone',
        'homePhone2' => 'object_homephone2', // *
        'homeFax' => 'object_homefax',
        'workPhone' => 'object_workphone',
        'workPhone2' => 'object_workphone2',  // *
        'cellPhone' => 'object_cellphone',
        //'carPhone' => 'object_carphone',
        //'radioPhone' => 'object_radiophone',
        //'companyPhone' => 'object_companyphone',
        'assistPhone' => 'object_assistantphone',  // *
        'fax' => 'object_fax',
        //'pager' => 'object_pager',
        'title' => 'object_title',
        'role' => 'object_role',
        'company' => 'object_company',
        'logo' => 'object_logo',
        'logotype' => 'object_logotype',
        'notes' => 'object_notes',
        'website' => 'object_url',
        //'freebusyUrl' => 'object_freebusyurl',
        //'pgpPublicKey' => 'object_pgppublickey',
        //'smimePublicKey' => 'object_smimepublickey',
        //'imaddress' => 'object_imaddress',
        //'imaddress2' => 'object_imaddress2',
        //'imaddress3' => 'object_imaddress3'
    ),
    'tabs' => array(
        _("Personal") => array('namePrefix', 'name', 'firstname',
'lastname', 'workPhone', 'fax', 'workEmail'),
        _("Communications") => array('homeEmail',
                                     'homePhone', 'homePhone2',
                                     'carPhone',
                                     'radioPhone', 'companyPhone',
                                     'assistPhone',
                                     'cellPhone'),
        _("Location") => array('homeStreet', 'homeCity',
                               'homePostalCode', 'homeCountry',
                               'homeAddress', 'workStreet', 'workPOBox',
                               'workCity', 'workPostalCode',
                               'workCountry', 'workAddress', 'timezone'),
        _("Organization") => array('title', 'role', 'company',
'department', 'logo', 'manager'),
        _("Other") => array('notes', 'website'),
    ),
    'search' => array(
        'name',
        'email',
        'company'
    ),
    'strict' => array(
        'object_id',
        'owner_id',
        'object_type',
        'object_uid'
    ),
    'export' => true,
    'browse' => true,
    'use_shares' => false,
    'list_name_field' => 'lastname',
    'alternative_name' => 'company',
);


More information about the dev mailing list