You are here

function search_files_directories_add in Search Files 5

generates the form to add a directory to search_files_directories table

Return value

(array) $form

5.x --> OK - ivazquez

1 call to search_files_directories_add()
search_files_directory_edit in ./search_files.module
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
1 string reference to 'search_files_directories_add'
search_files_menu in ./search_files.module
Implementation of hook_menu()

File

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

Code

function search_files_directories_add() {
  $form = array();
  $form['instructions'] = array(
    '#type' => 'markup',
    '#value' => t('Make sure the directory is readable by the web server, i.e. apache.'),
  );
  $form['search_files_directory'] = array(
    '#type' => 'textfield',
    '#title' => t('Directory Path'),
    '#size' => 80,
    '#maxlength' => 150,
    '#required' => TRUE,
    '#description' => t('The path of the directory to search. Do not end with a trailing \'/\''),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}