settings)) { $settings = unserialize($data->settings); } //check each field and add it to the exclude list if its not already there if($fields !== FALSE){ foreach($fields as $key => $value){ $exists = strpos($settings['excl_fields'],$value); if ($exists === FALSE){ $settings['excl_fields'] .= "\n".$value; } } } //check each path and add it to the exclude list if its not already there if($paths !== FALSE){ foreach($paths as $key => $value){ $exists = strpos($settings['excl_paths'],$value); if ($exists === FALSE){ $settings['excl_paths'] .= "\n".$value; } } } //check each field and add it to the force simple list if its not already there if($simple_fields !== FALSE){ foreach($simple_fields as $key => $value){ $exists = strpos($settings['simple_incl_fields'],$value); if ($exists === FALSE){ $settings['simple_incl_fields'] .= "\n".$value; } } } //check each path and add it to the force simple list if its not already there if($simple_paths !== FALSE){ foreach($simple_paths as $key => $value){ $exists = strpos($settings['simple_incl_paths'],$value); if ($exists === FALSE){ $settings['simple_incl_paths'] .= "\n".$value; } } } //save the settings db_query("DELETE FROM {fckeditor_settings} WHERE name = '%s'", 'FCKeditor Global Profile'); db_query("INSERT INTO {fckeditor_settings} (name, settings) VALUES ('%s', '%s')", 'FCKeditor Global Profile', serialize($settings)); }