You are here

function search_files_directory_edit_submit in Search Files 5

Updates the directory row in the serach_files_directories table from data given by the search_files_directory_edit form

Parameters

(array) $form_id:

(array) $form_values:

File

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

Code

function search_files_directory_edit_submit($form_id, $form_values) {

  //drupal_set_message('form_values= <pre>'.print_r($form_values, true).'</pre>');
  $sql = "UPDATE {search_files_directories} SET directory='%s' WHERE id='%s'";
  $result = db_query($sql, $form_values['search_files_directory'], $form_values['search_files_id']);
  if ($result) {
    drupal_set_message(t('Directory %directory has been updated', array(
      '%directory' => $form_values['search_files_directory'],
    )));
    drupal_goto('admin/settings/search_files/directories/list');
  }
}