diff options
-rw-r--r-- | modules/taxonomy/taxonomy.install | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index cdbafd5e3..9e8153c1a 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -260,7 +260,10 @@ function taxonomy_update_7002() { db_add_field('taxonomy_vocabulary', 'machine_name', $field); - foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) { + // Do a direct query here, rather than calling taxonomy_get_vocabularies(), + // in case Taxonomy module is disabled. + $vids = db_query('SELECT vid FROM {taxonomy_vocabulary}')->fetchCol(); + foreach ($vids as $vid) { $machine_name = 'vocabulary_' . $vid; db_update('taxonomy_vocabulary') ->fields(array('machine_name' => $machine_name)) |