Index: contrib/fckeditor.inc =================================================================== RCS file: contrib/fckeditor.inc diff -N contrib/fckeditor.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ contrib/fckeditor.inc 28 Apr 2010 08:56:32 -0000 @@ -0,0 +1,73 @@ +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)); +}