You are here

function search_files_helper_edit_submit in Search Files 5

Same name and namespace in other branches
  1. 6.2 search_files.module \search_files_helper_edit_submit()

update the row in the table search_files_helpers for the given helper app

Parameters

unknown_type $form_id:

unknown_type $form_values:

File

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

Code

function search_files_helper_edit_submit($form_id, $form_values) {

  //drupal_set_message('form_values = <pre>'.print_r($form_values, true).'</pre>');
  $sql = "\n    UPDATE\n      {search_files_helpers}\n    SET\n      name='%s',\n      extension='%s',\n      helper_path='%s'\n    WHERE\n      id='%s'\n  ";
  $result = db_query($sql, $form_values['search_files_name'], $form_values['search_files_extension'], $form_values['search_files_helper_path'], $form_values['search_file_id']);
  if ($result) {
    drupal_set_message(t('Helper app %helper_name has been updated', array(
      '%helper_name' => $form_values['search_files_name'],
    )));
    drupal_goto('admin/settings/search_files/helpers/list');
  }
}