diff -ur taxonomy_context/taxonomy_context.info taxonomy_context-new/taxonomy_context.info --- taxonomy_context/taxonomy_context.info 2008-02-06 19:13:39.000000000 -0500 +++ taxonomy_context-new/taxonomy_context.info 2008-02-16 16:19:06.000000000 -0500 @@ -3,7 +3,8 @@ description = Adds description and child term information to taxonomy term pages, provides vocabulary pages, and generates a context-sensitive menu block for each vocabulary. ; Information added by drupal.org packaging script on 2008-02-07 -version = "5.x-1.x-dev" +version = "6.x-1.x-dev" +core = "6.x" project = "taxonomy_context" datestamp = "1202343219" diff -ur taxonomy_context/taxonomy_context.module taxonomy_context-new/taxonomy_context.module --- taxonomy_context/taxonomy_context.module 2008-02-06 13:18:37.000000000 -0500 +++ taxonomy_context-new/taxonomy_context.module 2008-02-16 16:30:28.000000000 -0500 @@ -64,7 +64,7 @@ else { static $taxonomy_context_css_inserted = FALSE; if (variable_get('taxonomy_context_use_style', 1) && !$taxonomy_context_css_inserted) { - drupal_add_css(drupal_get_path('module', 'taxonomy_context') . '/taxonomy_context.css'); + drupal_add_css(drupal_get_path('module', 'taxonomy_context') .'/taxonomy_context.css'); $taxonomy_context_css_inserted = TRUE; } } @@ -133,10 +133,10 @@ return; } - $vocabulary = taxonomy_get_vocabulary($delta); + $vocabulary = taxonomy_vocabulary_load($delta); $block['subject'] = check_plain($vocabulary->name); - $block['content'] = taxonomy_context_menu_tree($delta, NULL, TRUE) . "\n"; + $block['content'] = taxonomy_context_menu_tree($delta, NULL, TRUE) ."\n"; return $block; } } @@ -144,7 +144,7 @@ /** * Implementation of hook_help(). */ -function taxonomy_context_help($section) { +function taxonomy_context_help($path, $args) { // If we're on a 2nd or subsequent page, don't show taxonomy info. if (arg(0) == 'taxonomy' && empty($_GET['from'])) { $context = taxonomy_context_get_context(); @@ -162,7 +162,7 @@ return $output; } - switch ($section) { + switch ($path) { case 'admin/help#taxonomy_context': $output .= t('
This module can be used to output title and description of the current taxonomy term plus child nodes of that term.
'); break; @@ -198,7 +198,7 @@ /** * Implementation of hook_form_alter(). */ -function taxonomy_context_form_alter($form_id, &$form) { +function taxonomy_context_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { $options = array(t('Disabled'), t('Enabled')); $form['taxonomy_context'] = array('#type' => 'fieldset', '#title' => t('Taxonomy context'), '#weight' => 0); @@ -222,7 +222,7 @@ $type = substr($form_id, 14, strlen($form_id)); $keys = array('term' => 'tid', 'vocabulary' => 'vid'); if ($form[$keys[$type]]) { - $object = new StdClass(); + $object = new stdClass(); $object->$keys[$type] = $form[$keys[$type]]['#value']; taxonomy_context_load($type, $object); } @@ -245,7 +245,7 @@ * Implementation of hook_nodeapi() */ function taxonomy_context_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { - switch($op) { + switch ($op) { case 'view': if ((arg(0) == 'node') && variable_get("taxonomy_context_inline_$node->type", 0)) { $node->content['taxonomy_context_taxonomy'] = array( @@ -254,7 +254,7 @@ ); $vocabularies = taxonomy_get_vocabularies($node->type); foreach ($vocabularies as $vocabulary) { - if ($vocabulary->terms = taxonomy_node_get_terms_by_vocabulary($node->nid, $vocabulary->vid)) { + if ($vocabulary->terms = taxonomy_node_get_terms_by_vocabulary($node, $vocabulary->vid)) { $node->content['taxonomy_context_taxonomy']['#value'] .= theme('taxonomy_context_vocabulary_list', $vocabulary); } } @@ -319,7 +319,7 @@ * Return the breadcrumb of taxonomy terms ending with $tid. * Statically caches results to reduce processing in the case of identical calls. */ -function taxonomy_context_get_breadcrumb($context){ +function taxonomy_context_get_breadcrumb($context) { static $breadcrumb; if (! isset($breadcrumb)) $breadcrumb = array(); @@ -329,8 +329,8 @@ if (! isset($breadcrumb[$cache_index])) { $breadcrumb[$cache_index][] = l(t('Home'), ''); - $vocabulary = taxonomy_get_vocabulary($context->vid); - $breadcrumb[$cache_index][] = l($vocabulary->name, 'taxonomy/vocabulary/' . $context->vid); + $vocabulary = taxonomy_vocabulary_load($context->vid); + $breadcrumb[$cache_index][] = l($vocabulary->name, 'taxonomy/vocabulary/'. $context->vid); $parents = taxonomy_get_parents_all($context->tid); if ($parents) { $parents = array_reverse($parents); @@ -359,7 +359,7 @@ } else { $vocabularies = array(); - $vocabularies[] = taxonomy_get_vocabulary($vid); + $vocabularies[] = taxonomy_vocabulary_load($vid); } foreach ($vocabularies as $vocabulary) { taxonomy_context_load('vocabulary', $vocabulary); @@ -377,7 +377,7 @@ $vocabulary->terms = taxonomy_get_tree($vocabulary->vid, 0, -1, 1); } if (count($vocabulary->terms)) { - foreach(array_keys($vocabulary->terms) as $key){ + foreach (array_keys($vocabulary->terms) as $key) { $vocabulary->terms[$key]->description = node_teaser($vocabulary->terms[$key]->description); // Load the term to ensure it gets a format assigned. taxonomy_context_load('term', $vocabulary->terms[$key]); @@ -477,7 +477,7 @@ $output .= '