[turba] Every one shares the same adresbook help!

Hans de Groot imp at dandy.nl
Tue Sep 2 13:01:44 PDT 2003


Help.

I upgraded to the cvs version of horde and the common modules.
I thought I got every thing working, but now I have a problem I logged in as an
otehr user and tested stuff.

When I go the the addressbook and I click "browse" I can see ALL addresses in
the database. Which is correct if you see the query from the log:

Sep 02 21:39:07 HORDE [error] [turba] DB Error: syntax error: SELECT object_id,
owner_id, object_type, object_members, object_name, object_email, object_alias,
object_homeaddress, object_workaddress, object_homephone, object_workphone,
object_cellphone, object_fax, object_title, object_company, object_notes,
object_pgppublickey, object_smimepublickey, object_freebusyurl FROM
turba_objects WHERE  [nativecode=1064 ** You have an error in your SQL syntax
near '' at line 1]

After the where clause there is nothing. When I added a and extra log it just
left the whole WHERE out. I added a manual WHERE owner_id='hansg at dandy.nl' and
I got the correct list.

I have been trying to see what's wrong but I can't find it. I tried al kinds of
config settings but it does not help. Than I tried to use the "prefs" "driver"
but this one gives me this error: Call to undefined function: init() in
/var/www/webmail/horde/turba/lib/Source.php on line 91

I also tried an older version from cvs (lib/Driver/sql.php and the browse.php)
but this did not help.

Did anyone test to see if their addresses got shared with every one?

I also tried to go back to 1.3.2 (stable) but this made horde redirect to itself
for ever and I dunno why that happnened. Some help would be very welcome coz I
am not sure what to do next, I tried hacking the sql query but this did not
work (I added this to the query and owner_id=$_SESSION['imp']['user']).

this is part of my conf.php: (please note I tried both the new and old examples)

Please help :-)




$cfgSources['localsql'] = array(
    'title' => _("Private AddressBook SQL"),
    'type' => 'sql',
    /**
     * The default connection details are pulled from the Horde-wide
     * SQL connection configuration.
     *
     * The old example illustrates how to use an alternate database
     * configuration.
     */
    // New Example:
    //'params' => array_merge($conf['sql'], array('table' => 'turba_objects')),

    // Old Example:
    'params' => array(
         'phptype' => 'mysql',
         'hostspec' => 'localhost',
         'username' => 'horde',
        'password' => 'hordeAW34',
         'database' => 'horde',
         'table' => 'turba_objects',
         'charset' => 'iso-8859-1'
     ),
    'map' => array(
        '__key' => 'object_id',
        '__owner' => 'owner_id',
        '__type' => 'object_type',
        '__members' => 'object_members',
        'name' => 'object_name',
        'email' => 'object_email',
        'alias' => 'object_alias',
        'homeAddress' => 'object_homeaddress',
        'workAddress' => 'object_workaddress',
        'homePhone' => 'object_homephone',
        'workPhone' => 'object_workphone',
        'cellPhone' => 'object_cellphone',
        'fax' => 'object_fax',
        'title' => 'object_title',
        'company' => 'object_company',
        'notes' => 'object_notes',
        'pgpPublicKey' => 'object_pgppublickey',
        'smimePublicKey' => 'object_smimepublickey',
        'freebusyUrl' => 'object_freebusyurl'
    ),
    'search' => array(
        'name',
        'email'
    ),
    'strict' => array(
        'object_id',
        'owner_id',
        'object_type',
    ),
    'public' => false,
   'readonly' => false,
    'admin' => array(),
    'export' => true
);


$cfgSources['prefs'] = array(
    'title' => _("Private Address Book"),
    'type' => 'prefs',
    'params' => array(
        'name' => 'prefs'
    ),
    'map' => array(
        '__key' => 'id',
        '__type' => '_type',
        '__members' => '_members',
        'name' => 'name',
        'email' => 'mail',
        'alias' => 'alias'
    ),
    'search' => array(
        'name',
        'email',
        'alias'
    ),
    'strict' => array(
        'id',
        '_type',
    ),
    'public' => false,
    'readonly' => false,
    'export' => true
);


Met vriendelijke groet,

Hans de Groot








More information about the turba mailing list