You are here

function apachesolr_bias_settings_page in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.admin.inc \apachesolr_bias_settings_page()
  2. 7 apachesolr_search.admin.inc \apachesolr_bias_settings_page()

Menu callback - Bias settings form.

1 string reference to 'apachesolr_bias_settings_page'
apachesolr_search_menu in ./apachesolr_search.module
Implements hook_menu().

File

./apachesolr_search.admin.inc, line 707
Administrative settings for searching.

Code

function apachesolr_bias_settings_page($environment = NULL) {
  if (empty($environment)) {
    $env_id = apachesolr_default_environment();
    $environment = apachesolr_environment_load($env_id);
  }
  $env_id = $environment['env_id'];

  // Initializes output with information about which environment's setting we are
  // editing, as it is otherwise not transparent to the end user.
  $output['apachesolr_environment'] = theme('apachesolr_settings_title', $env_id);

  // Adds content bias and type boost forms.
  $fields = apachesolr_search_get_fields($environment);
  $form = array();
  $form = drupal_get_form('apachesolr_search_bias_form', $env_id, $fields);
  $output['bias_forms'] = $form;
  $output_print = NULL;
  foreach ($output as $output_field) {
    $output_print .= $output_field;
  }
  return $output_print;
}