You are here

function termstatus_update_7000 in Taxonomy Term Status 7

Remove taxonomy_ prefix from variable names.

File

./termstatus.install, line 92
Install, update and uninstall functions for the termstatus module.

Code

function termstatus_update_7000() {
  if (variable_get('taxonomy_term_status_enable', FALSE)) {
    variable_set('termstatus_enable', TRUE);
  }
  variable_del('taxonomy_term_status_enable');
  $termstatus_vars = db_query("SELECT name FROM {variable} WHERE name LIKE 'taxonomy_termstatus_%'")
    ->fetchCol();
  foreach ($termstatus_vars as $old_name) {
    $new_name = substr($old_name, 9);
    variable_set($new_name, variable_get($old_name));
    variable_del($old_name);
  }
}