[horde] help writing a hook reading another pref

LALOT Dominique dom.lalot at gmail.com
Fri Mar 20 08:31:41 UTC 2009


Hello,

I would like to write a hook which is reading another prefs and I don't know
how to write it:

if (!function_exists('_prefs_hook_show_sidebar')) {
     function _prefs_hook_show_sidebar($name = null)
     {
#$app = $GLOBALS['prefs']->getValue('initial_application');
      Horde::logMessage("tracedom showsidebar app=$app", __FILE__, __LINE__,
PEAR_LOG_NOTICE);
         if (strcmp ('dimp',$app)==0)
            return false;
         else
            return true;
     }
}

It fails saying that I call getValue on a non object. I imagine that I try
to call before the prefs object is built.
How can I do that?

Thanks

Dom

-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the horde mailing list