function taxonomy_edge_is_order_invalid in Taxonomy Edge 7
Same name and namespace in other branches
- 8 taxonomy_edge.module \taxonomy_edge_is_order_invalid()
- 6 taxonomy_edge.module \taxonomy_edge_is_order_invalid()
Check if any sorted tree is invalid.
2 calls to taxonomy_edge_is_order_invalid()
- TaxonomyEdgeTreeTestCase::testOrder in tests/
tree.test - views_handler_sort_term_edge_hierarchy::query in views_taxonomy_edge/
handlers/ views_handler_sort_term_edge_hierarchy.inc - Overridden to add the ORDER BY clause and join required tables.
File
- ./
taxonomy_edge.module, line 788 - Optimization of taxonomy data model for SQL performance.
Code
function taxonomy_edge_is_order_invalid($reset = FALSE) {
static $invalid;
if ($reset || !isset($invalid)) {
$invalid = db_query_range("SELECT 1\n FROM {taxonomy_vocabulary} v\n LEFT JOIN {taxonomy_term_edge_order} o ON o.vid = -v.vid AND o.vid < 0\n WHERE o.oid IS NULL\n ", 0, 1)
->fetchField();
}
return $invalid;
}