[turba] Accessing external source
Jan Schneider
jan at horde.org
Tue Nov 8 05:43:03 PST 2005
Zitat von Andreas Dahlen <andreas at dahlen.ws>:
> Citerar Jan Schneider <jan at horde.org>:
>
>> Zitat von Andreas Dahlen <andreas at dahlen.ws>:
>>
>>> When searching on firstname or lastname I gett the following in the
>>> Horde log.
>>> Nov 08 12:48:11 HORDE [debug] [turba] SQL query by
>>> Turba_Driver_sql::_read(): SELECT ShortName, FirstName, LastName FROM
>>> User WHERE ShortName IN (?) [on line 145 of
>>> "/export/wwwdb/intern/webmail3/turba/lib/Driver/sql.php"]
>>
>> This can't be the corresponding configuration, because ShortName
>> doesn't even exist there:
>
> ShortName does exist; The first map-field is;
>
> '__key' => 'ShortName'
>
> Isn't that correct?
Doh. I've read three times through your configuration array and still
didn't see it.
>>> For my search I get 5 hits, and the browsed values are
>>> Name : [No Value]
>>> Email: Blank
>>>
>>> I've tried the following configuration;
>>> $cfgSources['intrasql'] = array(
>>> 'title' => "Sigma nBiT",
>>> 'type' => 'sql',
>>> 'params' => array(
>>> 'phptype' => 'mysql',
>>> 'hostspec' => 'localhost',
>>> 'username' => 'xxxxx',
>>> 'password' => 'xxxxx',
>>> 'database' => 'intranet',
>>> 'table' => 'User',
>>> 'charset' => 'iso-8859-1'
>>> ),
>>> 'map' => array(
>>> '__key' => 'ShortName',
>>> 'name' => array('fields' => array('FirstName', 'LastName'),
>>> 'format' => '%s %s'),
>>> 'email' => array('fields' => array('MailName'),
>>> 'format' => '%s at example.com'),
>>> 'firstname' => 'FirstName',
>>> 'lastname' => 'LastName'
>>> 'homePhone' => 'HomePhone',
>>> 'workPhone' => 'OfficePhone',
>>> 'cellPhone' => 'Mobile'
>>> ),
>>> 'search' => array(
>>> 'firstname',
>>> 'lastname',
>>> 'name'
>>> // 'alias'
>>> ),
>>> 'strict' => array(
>>> // 'alias'
>>> ),
>>> 'public' => true,
>>> 'readonly' => true,
>>> 'admin' => array(),
>>> 'export' => false
>>> );
>>>
>>>
>>> /Andreas
>>
>> Jan.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the turba
mailing list