You are here

function search_files_helper_edit in Search Files 5

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

fetch the helper add form, alter the form for use as an edit form, populate the #default_values fields and return the form

Return value

unknown

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

File

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

Code

function search_files_helper_edit() {
  $sql = "SELECT * FROM {search_files_helpers} WHERE ID = '%s'";
  $result = db_fetch_object(db_query($sql, arg(5)));
  $form = search_files_helper_add();
  $form['search_file_id'] = array(
    '#type' => 'value',
    '#value' => $result->id,
  );
  $form['search_files_helper_path']['#default_value'] = $result->helper_path;
  $form['search_files_extension']['#default_value'] = $result->extension;
  $form['search_files_name']['#default_value'] = $result->name;
  unset($form['submit_done']);
  $form['submit'] = array(
    '#value' => 'Update',
    '#type' => 'submit',
  );
  return $form;
}