[dev] Category preferences

Jason Rust jrust at rustyparts.com
Fri Jan 9 10:17:13 PST 2004


I'm having a problem with category preferences working.  I've submitted
a couple of patches to try and fix the issue, but both of them are
kludgey and introduce other problems.  The visible result of the problem
is that I have a shared calendar, and I have set the event_categories
and event_colors for this calendar in prefs.php and locked them.  When
the creator of that calendar views the calendar the categories all show
up fine.  When anybody else views the calendar they just see Unfiled.
The reason is that Kronolith calls getPrefByShare() to get the list of
categories.  getPrefByShare() loads up an instance of Prefs using the
owner of the calendar as $owner.  It then calls $_prefs->getPref() which
is supposed to look up the pref in the database and return it.  However,
because this pref is stored only in prefs.php it returns null, and
because $_prefs->retrieve() is never called for this instance of prefs
those defaults are never loaded in.  Look at line 564 of Share.php and
line 131 of Prefs/sql.php to see exactly how it is happening.

Does anybody have a thought on how to solve the problem?

-Jason

-- 
http://www.rustyparts.com/
puttin' some rust into it!


More information about the dev mailing list