You are here

function _jammer_messages_settings_submit in Jammer 7

Same name and namespace in other branches
  1. 6 jammer_messages.module \_jammer_messages_settings_submit()

Magic form submission handler.

Parameters

array $form:

array &$form_state:

File

./jammer_messages.module, line 119
Filter status messages set by drupal_set_message().

Code

function _jammer_messages_settings_submit($form, &$form_state) {
  $form_values = $form_state['values'];
  if ($form_values['jammer_messages_string'] == '') {
    drupal_set_message(t('Empty strings are not an accepted match string.'));
    return;
  }
  $mid = db_insert('jammer_messages')
    ->fields(array(
    'message_string' => $form_values['jammer_messages_string'],
  ))
    ->execute();
}