You are here

function search_files_helper_add_submit in Search Files 5

insert a row in the search_files_helpers table for the helper app given by the form

Parameters

unknown_type $form_id:

unknown_type $form_values:

File

./search_files.module, line 627
Used to index all files in directory(s) on the server

Code

function search_files_helper_add_submit($form_id, $form_values) {

  //drupal_set_message('form_values = <pre>'.print_r($form_values, true).'</pre>');
  $sql = "\n    INSERT INTO\n     {search_files_helpers}\n   SET\n    name='%s',\n    extension='%s',\n    helper_path='%s'\n  ";
  $result = db_query($sql, $form_values['search_files_name'], $form_values['search_files_extension'], $form_values['search_files_helper_path']);
  if ($result) {
    drupal_set_message(t('%helper helper added', array(
      '%helper' => $form_values['search_files_name'],
    )));
  }
  if ($form_values['clicked_button']['#id'] == 'edit-submit-done') {
    drupal_goto('admin/settings/search_files/helpers/list');
  }
}