[dev] Exclude preferences from being stored
Vilius Šumskas
vilius at lnk.lt
Thu May 14 11:23:59 UTC 2009
> I added some prefs to the imp preferences UI and I'm using the auto
> generated forms to change some server based settings via XML-RPC. All
> this settings are in a new category in the same location like the imp
> preferences. It all works very nice. The 'simple' problem is, the
> preferences are also stored in the preferences database and I don't
> want this for this kind of settings...
Ahh, very interesting usage of Prefs. I never would thought about that :)
What you probably need is _shutdown() function. From Prefs.php docs:
/**
* This function will be run at the end of every request as a shutdown
* function (registered by the Prefs:: constructor). All prefs with the
* dirty bit set will be saved to the storage backend at this time;
thus,
* there is no need to manually call $prefs->store() every time a
* preference is changed.
*
* @abstract
*/
function store()
{
}
Also, if I were you, I'd just write a new custom driver.
--
Best Regards,
Vilius Šumskas
LNK TV IT manager
mob.: +370 614 75713
http://www.lnk.lt
More information about the dev
mailing list