You are here

function suggestion_update_7001 in Autocomplete Search Suggestions 7

Migrate setting architecture to support min/max words in a suggestion.

File

./suggestion.install, line 121
The installation file for the suggestion module.

Code

function suggestion_update_7001() {
  if (!is_numeric(variable_get('suggestion_atoms', NULL))) {
    return;
  }
  if (!is_numeric(variable_get('suggestion_atoms_max', NULL))) {
    variable_set('suggestion_atoms_max', variable_get('suggestion_atoms', 6));
  }
  if (!is_numeric(variable_get('suggestion_atoms_min', NULL))) {
    variable_set('suggestion_atoms_min', 1);
  }
  variable_del('suggestion_atoms');
}