function apachesolr_default_environment in Apache Solr Search 6.3
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_default_environment()
 - 7 apachesolr.module \apachesolr_default_environment()
 
Get or set the default environment ID for the current page.
49 calls to apachesolr_default_environment()
- AbstractDrupalSolrOnlineWebTestCase::setUpSolr in tests/
solr_index_and_search.test  - apachesolr_bias_settings_page in ./
apachesolr_search.admin.inc  - Menu callback - Bias settings form.
 - apachesolr_config_file in ./
apachesolr.admin.inc  - Page callback to show one conf file.
 - apachesolr_config_files_overview in ./
apachesolr.admin.inc  - Page callback to show available conf files.
 - apachesolr_drush_solr_delete_index in drush/
apachesolr.drush.inc  - Selectively delete content from the apachesolr index.
 
2 string references to 'apachesolr_default_environment'
- apachesolr_set_default_environment in ./
apachesolr.module  - Set the default environment and let other modules know about the change.
 - apachesolr_uninstall in ./
apachesolr.install  - Implements hook_uninstall(). @todo : Remove the blocks with a query
 
File
- ./
apachesolr.module, line 1089  - Integration with the Apache Solr search application.
 
Code
function apachesolr_default_environment($env_id = NULL, $reset = FALSE) {
  static $default_env_id;
  if ($reset) {
    $default_env_id = NULL;
  }
  if (isset($env_id)) {
    $default_env_id = $env_id;
  }
  if (empty($default_env_id)) {
    $default_env_id = variable_get('apachesolr_default_environment', 'solr');
  }
  return $default_env_id;
}