function termcase_update_7001 in Termcase 7
Update the variables to use machine names.
File
- ./
termcase.install, line 34 - Install, update and uninstall functions for the Termcase module.
Code
function termcase_update_7001() {
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vid => $vocabulary) {
$vocabulary_name = $vocabulary->machine_name;
if (variable_get('taxonomy_vocabulary_' . $vocabulary_name . '_termcase', NULL) == NULL) {
variable_set('taxonomy_vocabulary_' . $vocabulary_name . '_termcase', variable_get('taxonomy_vocabulary' . $vid . '_termcase', NULL));
}
variable_del('taxonomy_vocabulary' . $vid . '_termcase');
}
}