[Tickets #11124] Re: decode_attribute hook an exceptions

bugs at horde.org bugs at horde.org
Tue Apr 3 06:00:51 UTC 2012


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: http://bugs.horde.org/ticket/11124
------------------------------------------------------------------------------
  Ticket           | 11124
  Aktualisiert Von | kd at tu-cottbus.de
  Zusammenfassung  | decode_attribute hook an exceptions
  Warteschlange    | Turba
  Version          | 3.0.12
  Typ              | Enhancement
  Status           | Feedback
  Priorität        | 1. Low
  Milestone        |
  Patch            |
  Zuständige       |
------------------------------------------------------------------------------


kd at tu-cottbus.de (2012-04-03 06:00) hat geschrieben:

> The purpose of the hook *is* to be called for any attribute. I don't  
> understand what you trying to achieve, besides that it would break  
> the intended behavior.
hmm,
i have a personal adressbook 'localsql' (nothing special, mainly the  
sample code) and
a global LDAP adressbook 'localldap'. Now i have no field for e.g. '  
freebusyUrl' in LDAP.
So i started with:
class Turba_Hooks
{
      public function decode_attribute($attribute, $value, $contact)
      {
            switch ($attribute) {
            case 'freebusyUrl':
                   ....
                   return $url;
            }
           return $value;
      }
}
Now I have 'freebusyUrl' in 'localldap', but magically lost all  
pictures in 'localsql'.
To get  the pictures in 'localsql' back, i have to throw an exception  
instead of the
default passthrough 'return $value'.
Now it works as expected, but i have tons of "No decode handler"  
errors in the Logs.
What I'm doing wrong here?





More information about the bugs mailing list