function search_files_helper_db_add in Search Files 7.2
Same name and namespace in other branches
- 6.2 search_files.module \search_files_helper_db_add()
Inserts a helper into the database.
2 calls to search_files_helper_db_add()
- search_files_helper_edit_form_submit in ./search_files.module 
- Updates the helper to the database.
- search_files_install_auto_helper_app_configuration in ./search_files.module 
- Detects helper applications and adds to database.
File
- ./search_files.module, line 488 
- Organizes and provides helper functions for extracting text from files.
Code
function search_files_helper_db_add($name, $extension, $helper_path) {
  // if there is already a helper for that extension we remove it first so we
  // dont' end up with multiple helpers for the same extension
  db_delete('search_files_helpers')
    ->condition('extension', $extension)
    ->execute();
  return db_insert('search_files_helpers')
    ->fields(array(
    'name' => $name,
    'extension' => $extension,
    'helper_path' => $helper_path,
  ))
    ->execute();
}