You are here

function search_files_helper_edit in Search Files 6.2

Same name and namespace in other branches
  1. 5 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 377
Used to index files in attachments and directories

Code

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