You are here

function similarterms_update_7000 in Similar By Terms 7

Implements hook_update_N().

Change from simterms_xxx to similarterms_xxx.

File

./similarterms.install, line 117
Similar By Terms install file

Code

function similarterms_update_7000(&$context) {
  $vocab = taxonomy_get_vocabularies();
  foreach ($vocab as $v) {
    variable_set("similarterms_count_{$v->vid}", variable_get("simterms_count_{$v->vid}"));
    variable_del("simterms_count_{$v->vid}");
    variable_set("similarterms_sametype_{$v->vid}", variable_get("simterms_sametype_{$v->vid}"));
    variable_del("simterms_sametype_{$v->vid}");
    variable_set("similarterms_ignoreterms_{$v->vid}", variable_get("simterms_ignoreterms_{$v->vid}"));
    variable_del("simterms_ignoreterms_{$v->vid}");
  }
  variable_set("similarterms_count_all", variable_get("simterms_count_all"));
  variable_del("simterms_count_all");
  variable_set("similarterms_sametype_all", variable_get("simterms_sametype_all"));
  variable_del("simterms_sametype_all");
  variable_set("similarterms_ignoreterms_all", variable_get("simterms_ignoreterms_all"));
  variable_del("simterms_ignoreterms_all");
}