function _taxonomy_manager_voc_is_empty in Taxonomy Manager 5
Same name and namespace in other branches
- 6.2 taxonomy_manager.admin.inc \_taxonomy_manager_voc_is_empty()
- 6 taxonomy_manager.admin.inc \_taxonomy_manager_voc_is_empty()
- 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.module - defines forms for taxonomy manager interface
File
- ./
taxonomy_manager.module, line 1133 - Taxonomy Manager
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;
}