Dan schrieb:
> I'm not sure if its zorloc or yourself who is doing the most work
> on WikiUser in the CVS, but I had a few questions.
it's me.
> http://phpwiki.sourceforge.net/phpwiki/WikiUser -> dated in
> 2001, says "there aint so such thing as setters and getters for
> User preferences yet"
this is not true anymore.
> The CVS code is obviously far more up to date, but doesn't
> exactly make it clear how to get and set preferences (despite,
> for all appearances, providing such functionality)
>
> Would it be possible to get WikiUser->getPreferences() &
> WikiUser->setPreferences() documented or at least an example
> of its use?
Please see WikiUserNew.php. WikiUser.php is not supported anymore and
I'd love to delete it.
WikiUser->getPreferences() gets the pref object which should be attached
to the user object (and for legacy reasons to the request object also).
WikiUser->setPreferences() updates this object, but the legimitate use
is request->_setUser() only, because the request object, the session and
cookie have to be updated also.
> I must admit I'm kind of lost following it (*sigh*).
pref->get(type) and pref->set(type,value) are self-documenting.
set only sets the object, not the storage.
since the storage methods are userobject specific (session, homepage or
database), you have to call pref->updatePrefs(prefs) and then
WikiUser->setPreferences().
> Another thing - when deploying PEAR packages for PHPwiki
> Plugins, whats the go there? The CVS does include a /pear/
> dir, but does this mean I have to include my pear packages
> there? Can I do something else? If I do incluide them, what
> environment vars should i be setting?
we had our own pear since the quality of pear was not enough and a lot
of too old versions were around. esp. for DB.
now pear matured, and we use lib/pear optionally, if you don't have your
own pear in the include_path.
only pear/File_Passwd.php is better than the standard pear, we force
that. but there are still remaining problems with file locking (stale
locks) on updates.
> I hope I haven't flooded your inbox with noobish questions
redirected to phpwiki-talk
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
|