Browse Source

formatted code and substituted site for apachesolr_search when checking for default search module

2.x-ebsco
Paul Pound 11 years ago
parent
commit
a9dae965a9
  1. 14
      targets/solr_site/theme/theme.inc

14
targets/solr_site/theme/theme.inc

@ -56,7 +56,15 @@ function roblib_search_solr_site_preprocessor(&$variables, $type) {
$search_url = $base_url . '/roblib_search/solr_site/' . $type . '/' . $query; $search_url = $base_url . '/roblib_search/solr_site/' . $type . '/' . $query;
drupal_add_js(drupal_get_path('module', 'roblib_search_solr_site') . '/js/solr_site_' . $type . '.js'); drupal_add_js(drupal_get_path('module', 'roblib_search_solr_site') . '/js/solr_site_' . $type . '.js');
$key = 'roblib_search_solr_site_' . $type; $key = 'roblib_search_solr_site_' . $type;
$default_module = variable_get('search_default_module','node'); $default_module = variable_get('search_default_module', 'site') == 'apachesolr_search'
drupal_add_js(array($key => array('search_url' => $search_url, 'search_query' => $query, ? 'site' : variable_get('search_default_module', 'site');
'base_url' => $base_url, 'default_site_type' => $default_module)), array('type' => 'setting'));
drupal_add_js(array(
$key => array(
'search_url' => $search_url,
'search_query' => $query,
'base_url' => $base_url,
'default_site_type' => $default_module
)
), array('type' => 'setting'));
} }

Loading…
Cancel
Save