You are here

function apachesolr_search_default_search_page in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_default_search_page()
  2. 7 apachesolr_search.module \apachesolr_search_default_search_page()

Get or set the default search page id for the current page.

3 calls to apachesolr_search_default_search_page()
apachesolr_search_init in ./apachesolr_search.module
Implements hook_init().
apachesolr_search_page_list_pages in ./apachesolr_search.admin.inc
Listing of all the search pages
apachesolr_search_page_settings_form in ./apachesolr_search.admin.inc
Menu callback/form-builder for the form to create or edit a search page.
4 string references to 'apachesolr_search_default_search_page'
apachesolr_search_form_search_block_form_alter in ./apachesolr_search.module
Implements hook_form_[form_id]_alter().
apachesolr_search_pages_config_form in ./apachesolr_search.admin.inc
apachesolr_search_page_settings_form_submit in ./apachesolr_search.admin.inc
Processes apachesolr_search_page_settings_form form submissions.
apachesolr_search_uninstall in ./apachesolr_search.install
Implements hook_uninstall().

File

./apachesolr_search.module, line 346
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_default_search_page($page_id = NULL, $reset = FALSE) {
  static $default_page_id = NULL;
  if ($reset) {
    $default_page_id = array();
  }
  if (isset($page_id)) {
    $default_page_id = $page_id;
  }
  if (empty($default_page_id)) {
    $default_page_id = variable_get('apachesolr_search_default_search_page', 'core_search');
  }
  return $default_page_id;
}