diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-05-06 06:08:28 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-05-06 06:08:28 +0000 |
commit | 77c361620463b2b5a859bbb1cd2bbceca6349d15 (patch) | |
tree | 5aaed47085d528b3c26e7ef86efcdb64a5d0a7f6 /modules/taxonomy/taxonomy.install | |
parent | ed86172814c02747b7036745f0411e34998c6f4a (diff) | |
download | brdo-77c361620463b2b5a859bbb1cd2bbceca6349d15.tar.gz brdo-77c361620463b2b5a859bbb1cd2bbceca6349d15.tar.bz2 |
#788370 by catch: Fixed taxonomy_update_7002() fails when taxonomy module is disabled.
Diffstat (limited to 'modules/taxonomy/taxonomy.install')
-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)) |