You are here

function _taxonomy_manager_voc_is_empty in Taxonomy Manager 6

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \_taxonomy_manager_voc_is_empty()
  2. 6.2 taxonomy_manager.admin.inc \_taxonomy_manager_voc_is_empty()
  3. 7 taxonomy_manager.admin.inc \_taxonomy_manager_voc_is_empty()

checks if voc has terms

Parameters

$vid voc id:

Return value

true, if terms already exists, else false

1 call to _taxonomy_manager_voc_is_empty()
taxonomy_manager_form in ./taxonomy_manager.admin.inc
defines forms for taxonomy manager interface

File

./taxonomy_manager.admin.inc, line 1100

Code

function _taxonomy_manager_voc_is_empty($vid) {
  $count = db_result(db_query_range("SELECT t.* FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE vid = %d AND h.parent = 0", $vid, 0, 1));
  if ($count == 0) {
    return true;
  }
  return false;
}