[horde] Do hooks.php get overwritten on pear upgrade ?

steffo76 at gmx.de steffo76 at gmx.de
Thu May 3 10:06:10 UTC 2012


-------- Original-Nachricht --------
> Datum: Thu, 03 May 2012 11:58:24 +0200
> Von: Jan Schneider <jan at horde.org>
> An: horde at lists.horde.org
> Betreff: Re: [horde] Do hooks.php get overwritten on pear upgrade ?

> 
> Zitat von steffo76 at gmx.de:
> 
> > -------- Original-Nachricht --------
> >> Datum: Thu, 03 May 2012 10:17:56 +0200
> >> Von: Jan Schneider <jan at horde.org>
> >> An: horde at lists.horde.org
> >> Betreff: Re: [horde] Do hooks.php get overwritten on pear upgrade ?
> >
> >>
> >> Zitat von Vilius ?umskas <vilius at lnk.lt>:
> >>
> >> >> Hello everyone,
> >> >>
> >> >> I just noticed that my signature hook had disappeared from imp's
> >> hooks.php.
> >> >> While looking for it I found out that hooks.php got overwritten when
> I
> >> last
> >> >> executed pear upgrade. I am aware that prefs should be stored in
> >> >> prefs.local.php and backends in backends.local.php but should hooks
> be
> >> >> stored in hooks.local.php ? I tried that but it doesn't seem to
> work.
> >> >
> >> > No, all files which has *.dist versions should not be overwritten by
> >> > pear upgrade.
> >>
> >> This is almost correct, with one exception: since hooks.php contains a
> >> class, we cannot simply use the loading mechanism that we use for the
> >> other configuration files. That's why we have to ship default hook as
> >> hooks.php in the groupware bundles. Those will be overwritten during
> >> the next upgrade.
> >> We yet have to find a better solution for that. Traits would be handy,
> >> but it's too early to require PHP 5.4.
> >
> > So should I just rename all hooks.php I changed to hooks.local.php ?  
> > Or is there anything else to consider ?
> 
> That's the safest solution for the time being. You might want to  
> integrate the hooks.php functionality that's delivered with the  
> groupware bundles into your own hooks.local.php files though.

Will do. But: what happens if an upgrade installs a new hooks.php- won't I end up with a broken installation and a log message saying

PHP Fatal error:  Cannot redeclare class imp_hooks in /bla/bla/bla/horde4/imp/config/hooks.local.php ? 

Then again that might be the better than losing the self made functionality without noticing right away. 

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a


More information about the horde mailing list