You are here

function shorten_cs_add_form_submit in Shorten URLs 6

Same name and namespace in other branches
  1. 7.2 shorten_cs.admin.inc \shorten_cs_add_form_submit()
  2. 7 shorten_cs.admin.inc \shorten_cs_add_form_submit()

Submits the form to add a new custom service.

File

./shorten_cs.admin.inc, line 113
Provides the configuration page for Shorten URLs Custom Services.

Code

function shorten_cs_add_form_submit($form, $form_state) {
  $v = $form_state['values'];
  $record = array();
  foreach (array(
    'name',
    'url',
    'type',
    'tag',
  ) as $key) {
    $record[$key] = $v[$key];
  }
  drupal_write_record('shorten_cs', $record);
}