You are here

function current_search_set_block_searcher in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 contrib/current_search/current_search.block.inc \current_search_set_block_searcher()
  2. 7 contrib/current_search/current_search.block.inc \current_search_set_block_searcher()

Sets the block searcher for a configuration.

Parameters

$name: A string containing the machine readable name of the configuration. The name also doubles as the block delta.

$searcher: The machine readable name of the searcher.

2 calls to current_search_set_block_searcher()
current_search_form_block_admin_configure_submit in contrib/current_search/current_search.block.inc
Form submit handler for block configuration form.
current_search_settings_form_submit in contrib/current_search/plugins/export_ui/current_search_export_ui.class.php
Form submission handler for current_search_settings_form().

File

contrib/current_search/current_search.block.inc, line 169
Block hook implementations and block form alterations.

Code

function current_search_set_block_searcher($name, $searcher) {

  // Deletes current search data.
  $query = "DELETE FROM {block_current_search} WHERE delta = '%s'";
  db_query($query, array(
    $name,
  ));

  // Inserts new data into database.
  $query = "INSERT INTO {block_current_search} (delta, searcher) VALUES ('%s', '%s')";
  db_query($query, array(
    $name,
    $searcher,
  ));
}