function apachesolr_has_searched in Apache Solr Search 7
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_has_searched()
- 5.2 apachesolr.module \apachesolr_has_searched()
- 5 apachesolr.module \apachesolr_has_searched()
- 6.3 apachesolr.module \apachesolr_has_searched()
- 6 apachesolr.module \apachesolr_has_searched()
- 6.2 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()
- ApacheSolrFacetapiAdapter::searchExecuted in plugins/
facetapi/ adapter.inc - Returns a boolean flagging whether $this->_searcher executed a search.
- apachesolr_search_block_view in ./
apachesolr_search.module - Implements hook_block_view().
- apachesolr_search_get_search_suggestions in ./
apachesolr_search.module - Retrieve all of the suggestions that were given after a certain search
- apachesolr_search_run in ./
apachesolr_search.module - Execute a search results based on keyword, filter, and sort strings.
- apachesolr_search_run_empty in ./
apachesolr_search.module - Execute a search with zero results rows so as to populate facets.
File
- ./
apachesolr.module, line 1098 - Integration with the Apache Solr search application.
Code
function apachesolr_has_searched($env_id, $searched = NULL) {
$_searched =& drupal_static(__FUNCTION__, FALSE);
if (is_bool($searched)) {
$_searched[$env_id] = $searched;
}
// Return false if the search environment is not available in our array
if (!isset($_searched[$env_id])) {
return FALSE;
}
return $_searched[$env_id];
}