You are here

function apachesolr_suppress_blocks in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_suppress_blocks()
  2. 6.3 apachesolr.module \apachesolr_suppress_blocks()

Semaphore that indicates whether Blocks should be suppressed regardless of whether a search has run.

Parameters

$suppress: A boolean indicating whether to suppress.

Return value

TRUE if a search has been executed. FALSE otherwise.

3 calls to apachesolr_suppress_blocks()
ApacheSolrFacetapiAdapter::suppressOutput in plugins/facetapi/adapter.inc
Suppress output of the realm
apachesolr_search_block_view in ./apachesolr_search.module
Implements hook_block_view().
apachesolr_search_search_results in ./apachesolr_search.module
Executes search depending on the conditions given. See apachesolr_search.pages.inc for another use of this function

File

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

Code

function apachesolr_suppress_blocks($env_id, $suppress = NULL) {
  $_suppress =& drupal_static(__FUNCTION__, FALSE);
  if (is_bool($suppress)) {
    $_suppress[$env_id] = $suppress;
  }

  // Return false if the search environment is not available in our array
  if (!isset($_suppress[$env_id])) {
    return FALSE;
  }
  return $_suppress[$env_id];
}