You are here

function _similar_taxonomy_get_vocabularies in Similar Entries 5

Get all vocabularies

Return value

array

1 call to _similar_taxonomy_get_vocabularies()
similar_block in ./similar.module
Implementation of hook_block().

File

./similar.module, line 438
Module that shows a block listing similar entries. NOTE: Uses MySQL's FULLTEXT indexing for MyISAM tables.

Code

function _similar_taxonomy_get_vocabularies() {
  $v = array();
  $vocs = taxonomy_get_vocabularies();
  $result = db_query("SELECT DISTINCT(n.type) FROM {node} n WHERE n.status <> 0 ORDER BY n.type ASC");
  foreach ($vocs as $voc) {
    $v[$voc->vid] = $voc->name;
  }
  return $v;
}