You are here

function search_files_directories_list in Search Files 5

gets a list of directories to inde from the search_files_directories table and themes the list in a table

Return value

(string) $output = themed table of directories

5.x --> OK - ivazquez

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

File

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

Code

function search_files_directories_list() {
  $result = db_query('SELECT * FROM {search_files_directories}');
  $directories[] = array();
  $destination = drupal_get_destination();
  while ($directory = db_fetch_object($result)) {
    $directories[] = array(
      $directory->directory,
      l(t('Edit'), 'admin/settings/search_files/directory/edit/' . $directory->id),
      l(t('Delete'), 'admin/settings/search_files/directory/delete/' . $directory->id),
      array(
        $destination,
      ),
    );
  }
  $header = array(
    'Directory',
    array(
      'data' => t('Operations'),
      'colspan' => '3',
    ),
  );
  $output .= theme('table', $header, $directories);
  return $output;
}