You are here

function custom_search_blocks_update_7101 in Custom Search 7

File

modules/custom_search_blocks/custom_search_blocks.install, line 37
Install, update, and uninstall functions for the custom search module.

Code

function custom_search_blocks_update_7101() {
  $blocks = variable_get('custom_search_blocks_number', 1);
  for ($delta = 1; $delta <= $blocks; $delta++) {
    variable_set('custom_search_blocks_' . $delta . '_submit_text', variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT));
    variable_set('custom_search_blocks_' . $delta . '_image_path', variable_get('custom_search_image_path', ''));
    variable_set('custom_search_blocks_' . $delta . '_criteria_or_display', variable_get('custom_search_criteria_or_display', FALSE));
    variable_set('custom_search_blocks_' . $delta . '_criteria_or_label', variable_get('custom_search_criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT));
    variable_set('custom_search_blocks_' . $delta . '_criteria_phrase_display', variable_get('custom_search_criteria_phrase_display', FALSE));
    variable_set('custom_search_blocks_' . $delta . '_criteria_phrase_label', variable_get('custom_search_criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT));
    variable_set('custom_search_blocks_' . $delta . '_criteria_negative_display', variable_get('custom_search_criteria_negative_display', FALSE));
    variable_set('custom_search_blocks_' . $delta . '_criteria_negative_label', variable_get('custom_search_criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT));
  }
}