You are here

function search_files_directories_add_submit in Search Files 5

adds a row to the search_files directories table with the information provided by the search_files_directory_add_form.

Parameters

unknown_type $form_id:

unknown_type $form_values:

5.x --> OK - ivazquez

File

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

Code

function search_files_directories_add_submit($form_id, $form_values) {
  $sql = "INSERT INTO {search_files_directories} (directory) VALUES ('%s')";

  //$result = db_query($sql, $form_values['values']['search_files_directory'], $form_values['values']['search_files_label']); //pepe
  $result = db_query($sql, $form_values['search_files_directory']);
  if ($result) {
    drupal_set_message(t('Directory %directory has been added. I may take up to 1 day to start indexing this directory.', array(
      '%directory' => $form_values['search_files_directory'],
    )));
    drupal_goto('admin/settings/search_files/directories/list');
  }
}