You are here

function search_files_directory_edit in Search Files 5

generates the directory edit form, it does this by grabbing the directory add form and populates the #default_value fields for the directory in question

Return value

(array) $form

1 string reference to 'search_files_directory_edit'
search_files_menu in ./search_files.module
Implementation of hook_menu()

File

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

Code

function search_files_directory_edit() {

  //drupal_set_message('arg5 = <pre>'.print_r(arg(5), true).'</pre>');
  $sql = "SELECT * FROM {search_files_directories} WHERE ID = '%s'";
  $result = db_fetch_object(db_query($sql, arg(5)));
  $form = array();
  $form = search_files_directories_add();
  $form['search_files_directory']['#default_value'] = $result->directory;
  $form['search_files_id'] = array(
    '#type' => 'value',
    '#value' => $result->id,
  );
  return $form;
}