Index: modules/taxonomy_context/taxonomy_context.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_context/taxonomy_context.module,v
retrieving revision 1.43.2.7
diff -u -u -F^f -r1.43.2.7 taxonomy_context.module
--- modules/taxonomy_context/taxonomy_context.module 16 Oct 2006 04:05:24 -0000 1.43.2.7
+++ modules/taxonomy_context/taxonomy_context.module 23 Oct 2006 16:33:57 -0000
@@ -175,20 +175,24 @@ function taxonomy_context_vocabulary_pag
else {
$terms = taxonomy_context_vocabulary_first_child_terms($vid);
}
+ $output .= theme('taxonomy_context_vocabulary_terms', $vocabulary, $terms);
+ drupal_set_title($vocabulary->name);
+ return $output;
+}
+
+function theme_taxonomy_context_vocabulary($vocabulary) {
+ return '
' . $vocabulary->description . "
\n";
+}
+function theme_taxonomy_context_vocabulary_terms($voc, $terms) {
$output .= "\n";
foreach($terms as $term){
$term->description = node_teaser($term->description);
$term->title = $term->name;
$output .= theme('taxonomy_context_term', $term, 'subterm');
}
- drupal_set_title($vocabulary->name);
return $output;
}
-function theme_taxonomy_context_vocabulary($vocabulary) {
- return '' . $vocabulary->description . "
\n";
-}
-
/**
* Return themed output of given term
*
@@ -218,6 +222,9 @@ function taxonomy_context_show_term($tid
*/
function taxonomy_context_show_subterms($tid, $vid = 0) {
$terms = taxonomy_context_get_subterms($tid, $vid);
+ return theme('taxonomy_context_subterms', $terms);
+}
+function theme_taxonomy_context_subterms($terms) {
$output = '';
if (!(empty($terms))) {
$output .= "\n";
@@ -249,7 +256,7 @@ function taxonomy_context_get_subterms($
*/
function taxonomy_context_vocabulary_first_child_terms($vid) {
$terms = array();
- $result = db_query(db_rewrite_sql('SELECT n.tid,n.name,n.description FROM {term_hierarchy} t INNER JOIN {term_data} n ON t.tid = n.tid WHERE n.vid = %d AND t.parent = 0 ORDER BY n.weight, n.name', 'n', 'tid'), $vid);
+ $result = db_query(db_rewrite_sql('SELECT n.tid,n.vid,n.name,n.description FROM {term_hierarchy} t INNER JOIN {term_data} n ON t.tid = n.tid WHERE n.vid = %d AND t.parent = 0 ORDER BY n.weight, n.name', 'n', 'tid'), $vid);
while ($term = db_fetch_object($result)) {
$terms[] = $term;
}