--- menutrails.module-release-6.x-1.0 2008-10-13 17:32:51.000000000 -0400 +++ menutrails.module 2009-12-21 16:49:58.000000000 -0500 @@ -127,9 +127,11 @@ function menutrails_node_location($node) $type_trails = variable_get('menutrails_node_types', array()); $href = $type_trails[$node->type] ? $type_trails[$node->type] : FALSE; $term_trails = variable_get('menutrails_terms', array()); - foreach ($node->taxonomy as $term) { - if ($term_trails[$term->tid]) { - $href = $term_trails[$term->tid]; + if(module_exists("taxonomy") && is_array($node->taxonomy)) { + foreach ($node->taxonomy as $term) { + if ($term_trails[$term->tid]) { + $href = $term_trails[$term->tid]; + } } } } @@ -247,8 +249,6 @@ function menutrails_menutrails_settings( $form = array(); $node_types = node_get_types('names'); $node_trails = variable_get('menutrails_node_types', array()); - $vocabs = taxonomy_get_vocabularies(); - $term_trails = variable_get('menutrails_terms', array()); $form['menutrails_node_types'] = array( '#tree' => TRUE, '#type' => 'fieldset', @@ -263,23 +263,27 @@ function menutrails_menutrails_settings( '#options' => $options, ); } - foreach ($vocabs as $vocab) { - if ($vocab->tags != 1) { - // tagging gets out of hand too fast, so we disallow - $form[$vocab->vid]['menutrails_terms'] = array( - '#tree' => TRUE, - '#type' => 'fieldset', - '#collapsible' => TRUE, - '#collapsed' => TRUE, - '#title' => t('Categories:') ." $vocab->name", - ); - $terms = taxonomy_get_tree($vocab->vid); - foreach ($terms as $term) { - $form[$vocab->vid]['menutrails_terms'][$term->tid] = array('#type' => 'select', - '#title' => t('Parent item for') ." $term->name", - '#default_value' => $term_trails[$term->tid], - '#options' => $options, + if(module_exists("taxonomy")) { + $vocabs = taxonomy_get_vocabularies(); + $term_trails = variable_get('menutrails_terms', array()); + foreach ($vocabs as $vocab) { + if ($vocab->tags != 1) { + // tagging gets out of hand too fast, so we disallow + $form[$vocab->vid]['menutrails_terms'] = array( + '#tree' => TRUE, + '#type' => 'fieldset', + '#collapsible' => TRUE, + '#collapsed' => TRUE, + '#title' => t('Categories:') ." $vocab->name", ); + $terms = taxonomy_get_tree($vocab->vid); + foreach ($terms as $term) { + $form[$vocab->vid]['menutrails_terms'][$term->tid] = array('#type' => 'select', + '#title' => t('Parent item for') ." $term->name", + '#default_value' => $term_trails[$term->tid], + '#options' => $options, + ); + } } } }