You are here

function wysiwyg_profile_overview_submit in Wysiwyg 6

Same name and namespace in other branches
  1. 5.2 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
  2. 5 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
  3. 6.2 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()
  4. 7.2 wysiwyg.admin.inc \wysiwyg_profile_overview_submit()

Submit callback for Wysiwyg profile overview form.

File

./wysiwyg.admin.inc, line 475
Integrate Wysiwyg editors into Drupal.

Code

function wysiwyg_profile_overview_submit($form, &$form_state) {
  foreach ($form_state['values']['formats'] as $format => $values) {
    db_query("UPDATE {wysiwyg} SET editor = '%s' WHERE format = %d", $values['editor'], $format);
    if (!db_affected_rows()) {
      db_query("INSERT INTO {wysiwyg} (format, editor) VALUES (%d, '%s')", $format, $values['editor']);
    }
  }
}