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