You are here

function search_files_helper_list in Search Files 5

Same name and namespace in other branches
  1. 6.2 search_files.module \search_files_helper_list()
  2. 7.2 search_files.module \search_files_helper_list()

display a themes table of the current helper apps set up in the system

Return value

(string) html table

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

File

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

Code

function search_files_helper_list() {
  $sql = "SELECT * FROM {search_files_helpers} ORDER BY extension";
  $result = db_query($sql);
  $helpers[] = array();
  $destination = drupal_get_destination();
  while ($helper = db_fetch_object($result)) {
    $helpers[] = array(
      $helper->name,
      $helper->extension,
      l(t('Edit'), 'admin/settings/search_files/helpers/edit/' . $helper->id),
      l(t('Delete'), 'admin/settings/search_files/helpers/delete/' . $helper->id),
      array(
        $destination,
      ),
    );
  }
  $header = array(
    t('Helper name'),
    t('Extension'),
    array(
      'data' => t('Operations'),
      'colspan' => '3',
    ),
  );
  $output .= theme('table', $header, $helpers);
  return $output;
}