function _taxonomy_manager_voc_is_empty in Taxonomy Manager 7
Same name and namespace in other branches
- 5 taxonomy_manager.module \_taxonomy_manager_voc_is_empty()
- 6.2 taxonomy_manager.admin.inc \_taxonomy_manager_voc_is_empty()
- 6 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 2416
Code
function _taxonomy_manager_voc_is_empty($vid) {
$has_rows = (bool) db_query_range("SELECT 1 FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE vid = :vid AND h.parent = 0", 0, 1, array(
':vid' => $vid,
))
->fetchField();
return !$has_rows;
}