You are here

function finder_admin_add_form_submit in Finder 7

Same name and namespace in other branches
  1. 6 includes/finder.admin.inc \finder_admin_add_form_submit()

Submit function for admin finder add form.

File

includes/finder.admin.inc, line 90
The finder admin screens.

Code

function finder_admin_add_form_submit($form, &$form_state) {
  $values =& $form_state['values'];
  $finder = (object) array(
    'base' => $values['base'],
  );
  finder_save($finder);
  $finder->title = t('Finder !1', array(
    '!1' => $finder->finder_id,
  ));
  $finder->path = 'finder/' . $finder->finder_id;
  finder_save($finder);
  drupal_set_message(t('A finder was added.  Configure the finder and add elements below.'));
  menu_rebuild();
  drupal_goto('admin/structure/finder/' . $finder->finder_id . '/edit');
}