function i18ntaxonomy_node_get_terms in Internationalization 6
Find all terms associated with the given node, ordered by vocabulary and term weight.
Same as taxonomy_node_get_terms() but without static caching.
1 call to i18ntaxonomy_node_get_terms()
- i18nsync_node_taxonomy in i18nsync/
i18nsync.module - Synchronize taxonomy.
File
- i18ntaxonomy/
i18ntaxonomy.module, line 752 - i18n taxonomy module
Code
function i18ntaxonomy_node_get_terms($node, $key = 'tid') {
$result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.vid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $node->vid);
$terms = array();
while ($term = db_fetch_object($result)) {
$terms[$term->{$key}] = $term;
}
return $terms;
}