function wysiwyg_profile_overview_submit in Wysiwyg 5.2
Same name and namespace in other branches
- 5 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
- 6.2 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
- 6 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
- 7.2 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
Submit callback for Wysiwyg profile overview form.
File
- ./
wysiwyg.admin.inc, line 499 - Integrate Wysiwyg editors into Drupal.
Code
function wysiwyg_profile_overview_submit($form_id, &$form_values) {
foreach ($form_values['formats'] as $format => $values) {
db_query("UPDATE {wysiwyg} SET editor = '%s' WHERE format = %d", $values['editor'], $format);
if (!db_affected_rows() && !empty($values['editor'])) {
db_query("INSERT INTO {wysiwyg} (format, editor) VALUES (%d, '%s')", $format, $values['editor']);
}
}
}