[imp] Preferences

Cliff Green green@UMDNJ.EDU
Mon, 12 Nov 2001 11:09:20 -0500


Quoting Jan Schneider <jan@horde.org>:
> Zitat von Cliff Green <green@UMDNJ.EDU>:

[munch]

> > > <log extract>
> > > Nov 08 17:36:24 HORDE [info] [horde] Could not retrieve
> > > preferences. [ on line 147 of 
> > > /usr/local/apache/htdocs/horde/lib/Prefs/sql.php"]
> > > </log extract>
> > > 
> > > It appears, at line 146, that (count($prefs) == 0), so I guess my
> > > prefs aren't being retrieved, though I can go into Options and
> > > view/change/save/retrieve them.  So, where is the session setup for
> > > $prefs happening?

> 
> I just had the time to take a look at this.

Thanks!

> You shouldn't care about this message. It appears because Horde tries to
> load its own preferences (opposed to say IMP's) but we currently have no
> preferences in Horde, only shared preferences in IMP.

It happens when switching to jonah, too (twice).

So, if I'm reading you correctly, there's at least four possibilities:
1) leave it as it is and put up with those log messages
2) add/create at least a place-holder pref for those applications with none
3) add logic to the Prefs drivers to recognize apps with no prefs structures
4) remove the (count($prefs == 0) test

I'd suggest that #2, above, offers structural consistency between apps, and
the least impact on the current logic.

To test this, I copied turba's prefs.php file to both jonah/config and
horde/config, and added 
 @file_exists('./config/prefs.php') &&
to the $[app]_configured test in index.php for both apps.  The error
messages went away.

Am I breaking something by doing this?

c
-- 
Cliff Green
Academic Computing Services - UMDNJ
Signature under NDA


-----------------------------------------------------
This mail sent through IMP: the Internet Mail Program