You are here

function search_files_get_file_extensions in Search Files 6.2

Same name and namespace in other branches
  1. 5 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_directories_search in ./search_files_directories.module
Implementation of hook_search().

File

./search_files.module, line 507
Used to index files in attachments and directories

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;
}