You are here

function apachesolr_search_get_book in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr_search.module \apachesolr_search_get_book()
  2. 6.2 apachesolr_search.module \apachesolr_search_get_book()

Callback function for the 'Filter by book' facet block.

1 string reference to 'apachesolr_search_get_book'
apachesolr_search_block in ./apachesolr_search.module
Implementation of hook_block().

File

./apachesolr_search.module, line 693
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_get_book($facet, &$options) {
  if (is_numeric($facet)) {
    return db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $facet));
  }
  else {
    $options['html'] = TRUE;
    return theme('placeholder', t('Not in any book'));
  }
}