You are here

function apachesolr_drush_solr_get_env_id in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_env_id()
  2. 7 drush/apachesolr.drush.inc \apachesolr_drush_solr_get_env_id()
1 string reference to 'apachesolr_drush_solr_get_env_id'
apachesolr_drush_command in drush/apachesolr.drush.inc
Implements hook_drush_command().

File

drush/apachesolr.drush.inc, line 300
drush integration for apachesolr.

Code

function apachesolr_drush_solr_get_env_id() {
  $all = drush_get_option('all');
  if ($all) {
    foreach (apachesolr_load_all_environments() as $id => $env) {
      drush_print(drush_format($env['name'], $id));
    }
  }
  else {
    $solr_env_id = apachesolr_default_environment();
    drush_print($solr_env_id);
  }
}