function pathauto_update_7002 in Pathauto 7
Update pathauto_taxonomy_[vid]_pattern variables to pathauto_taxonomy_[machinename]_pattern.
File
- ./
pathauto.install, line 148 - Install, update, and uninstall functions for Pathauto.
Code
function pathauto_update_7002() {
if (module_exists('taxonomy')) {
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vid => $vocabulary) {
if ($vid == variable_get('forum_nav_vocabulary', '')) {
// Skip the forum vocabulary.
continue;
}
if ($pattern = variable_get('pathauto_taxonomy_' . $vid . '_pattern', '')) {
variable_set('pathauto_taxonomy_' . $vocabulary->machine_name . '_pattern', $pattern);
}
variable_del('pathauto_taxonomy_' . $vid . '_pattern');
}
}
}