From 77c361620463b2b5a859bbb1cd2bbceca6349d15 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 6 May 2010 06:08:28 +0000 Subject: #788370 by catch: Fixed taxonomy_update_7002() fails when taxonomy module is disabled. --- modules/taxonomy/taxonomy.install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') 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)) -- cgit v1.2.3