summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa84dac)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12876
7612ce4b-ef26-0410-bec9-
ea0150e637f0
} /* End of SquirrelOption class*/
/**
} /* End of SquirrelOption class*/
/**
+ * Saves the option value (this is the default save function
+ * unless overridden by the user)
+ *
* @param object $option object that holds option name and new_value
*/
function save_option($option) {
* @param object $option object that holds option name and new_value
*/
function save_option($option) {
+
+ // Can't save the pref if we don't have the username
+ //
if ( !sqgetGlobalVar('username', $username, SQ_SESSION ) ) {
if ( !sqgetGlobalVar('username', $username, SQ_SESSION ) ) {
- /* Can't save the pref if we don't have the username */
- setPref($data_dir, $username, $option->name, $option->new_value);
+
+ // Certain option types need to be serialized because
+ // they are not scalar
+ //
+ if ($option->type == SMOPT_TYPE_FLDRLIST_MULTI)
+ setPref($data_dir, $username, $option->name, serialize($option->new_value));
+ else
+ setPref($data_dir, $username, $option->name, $option->new_value);
+