[turba] writing a turba driver

Chuck Hagenbuch chuck@horde.org
Sat, 15 Jun 2002 12:34:41 -0400


Quoting Mathieu Legare <legare@uqtr.ca>:

> I have only implemented read-only features.  The problem is that
> is always return the first element found even if there is more 
> than one match.  Printing debbuging information in lib/Driver/ph.php
> show me that it found more than one matchs :
> 
> in lib/Driver/ph.php - search method :
> 
> function search($criteria, $fields, $strict_fields = array(), 
>                 $match = TURBA_SEARCH_AND)
> {
>    $results = array();
> 
>    $k=0;
>    while(reading input lines from the opened socket)
>    {
>       if(reading a new match)
>       {
>          $results[$k] = $entry;
>          $k++;
>          $entry = array();
>       }
>       ...
>       $entry[$key] = ltrim($value);

Without seeing all of your code and being able to test it, it's really hard 
to say. When searching from Turba, api.php doesn't come into play, so you 
should be debugging elsewhere - maybe in Turba_Source ?

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in 
the arms of silence. All we ever have is here, now." - Ursula K. Le Guin