You are here

function apachesolr_search_page_save in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_page_save()
  2. 6.3 apachesolr_search.module \apachesolr_search_page_save()
4 calls to apachesolr_search_page_save()
apachesolr_search_apachesolr_default_environment in ./apachesolr_search.module
Implements hook_apachesolr_default_environment()
apachesolr_search_page_clone in ./apachesolr_search.module
Function that clones a search page
apachesolr_search_page_settings_form_submit in ./apachesolr_search.admin.inc
Processes apachesolr_search_page_settings_form form submissions.
hook_apachesolr_default_environment in ./apachesolr.api.php
Lets modules know when the default environment is changed.

File

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

Code

function apachesolr_search_page_save($search_page) {
  if (!empty($search_page)) {
    db_merge('apachesolr_search_page')
      ->key(array(
      'page_id' => $search_page['page_id'],
    ))
      ->fields(array(
      'label' => $search_page['label'],
      'page_id' => $search_page['page_id'],
      'description' => $search_page['description'],
      'env_id' => $search_page['env_id'],
      'search_path' => $search_page['search_path'],
      'page_title' => $search_page['page_title'],
      'settings' => serialize($search_page['settings']),
    ))
      ->execute();
  }
}