You are here

function apachesolr_has_searched in Apache Solr Search 6

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_has_searched()
  2. 5.2 apachesolr.module \apachesolr_has_searched()
  3. 5 apachesolr.module \apachesolr_has_searched()
  4. 6.3 apachesolr.module \apachesolr_has_searched()
  5. 6.2 apachesolr.module \apachesolr_has_searched()
  6. 7 apachesolr.module \apachesolr_has_searched()

Semaphore that indicates whether a search has been done. Blocks use this later to decide whether they should load or not.

Parameters

$searched: A boolean indicating whether a search has been executed.

Return value

TRUE if a search has been executed. FALSE otherwise.

5 calls to apachesolr_has_searched()
apachesolr_block in ./apachesolr.module
Implementation of hook_block().
apachesolr_og_block in contrib/apachesolr_og/apachesolr_og.module
Implementation of hook_block().
apachesolr_search_block in ./apachesolr_search.module
Implementation of hook_block().
apachesolr_search_execute in ./apachesolr_search.module
Execute a search results based on keyword, filter, and sort strings.
apachesolr_search_form_search_form_alter in ./apachesolr_search.module
Implementation of hook_form_[form_id]_alter().

File

./apachesolr.module, line 1295
Integration with the Apache Solr search application.

Code

function apachesolr_has_searched($searched = NULL) {
  static $_searched = FALSE;
  if (is_bool($searched)) {
    $_searched = $searched;
  }
  return $_searched;
}