Index: synonyms.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/synonyms/synonyms.module,v
retrieving revision 1.4
diff -u -p -r1.4 synonyms.module
--- synonyms.module 7 Jan 2009 13:38:40 -0000 1.4
+++ synonyms.module 8 Jul 2009 04:24:19 -0000
@@ -1,36 +1,36 @@
nid > 0 && !empty($node->taxonomy)) {
- $text = array();
- $getTerms = $node->taxonomy;
+ $text = array();
+ $terms = $node->taxonomy;
- foreach($getTerms as $nodeTerm) {
- $childSynonyms = taxonomy_get_synonyms($nodeTerm->tid);
- foreach($childSynonyms as $childSynonym){
- $text[] = $childSynonym;
- }
- $parents = taxonomy_get_parents($nodeTerm->tid);
- foreach($parents as $parent) {
- $text[] = $parent->name;
- $synonyms = taxonomy_get_synonyms($parent->tid);
- foreach($synonyms as $synonym){
- $text[] = $synonym;
- }
- }
+ foreach($terms as $term) {
+ $term_synonyms = taxonomy_get_synonyms($term->tid);
+ foreach($term_synonyms as $term_synonym){
+ $text[] = $term_synonym;
}
-
- return '('. implode(', ', $text) .')';
- } else {
- return false;
+ $parents = taxonomy_get_parents($term->tid);
+ foreach($parents as $parent) {
+ $text[] = $parent->name;
+ $parent_synonyms = taxonomy_get_synonyms($parent->tid);
+ foreach($parent_synonyms as $parent_synonym){
+ $text[] = $parent_synonym;
+ }
+ }
+ }
+ return '('. implode(', ', $text) .')';
+ }
+ else {
+ return false;
}
}
}