boolean SetPreference (string $preference_name, string $value)
But, in looking at the code, it seems that the return value will always be NULL since the cms_siteprefs::set() method used to implement it has no return statement and is documented as returning "void":
Code: Select all
/**
* Sets the given site perference with the given value.
*
* @since 0.6
* @param string The preference name
* @param mixed The preference value (will be stored as a string)
* @return void
*/
function set_site_preference($prefname, $value)
{
return cms_siteprefs::set($prefname,$value);
}
While it would be nice if there were a useful boolean value returned from CMSModule::SetPreference(), if that isn't possible at this point in the 1.10 release cycle, then the docs should at least be updated to note the problem and/or reflect reality.