You are here

function search_files_get_file_extensions in Search Files 5

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

returns an array of the file extensions with the extension as the key and the name of the file type as the value, this data is retrieved from the search_files_helpers table

Return value

(array)

1 call to search_files_get_file_extensions()
search_files_search in ./search_files.module
implementation of hook_search()

File

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

Code

function search_files_get_file_extensions() {
  $extensions = array();
  $result = db_query('SELECT extension, name FROM {search_files_helpers}');
  while ($helper = db_fetch_object($result)) {
    $extensions[$helper->extension] = $helper->name;
  }
  return $extensions;
}