Skip to content

Commit 0ea8cc5

Browse files
VeMagrombert
authored andcommittedApr 30, 2012
Small changes to include global categories in graph
and to hide empty values Fixes #012293
1 parent a79396b commit 0ea8cc5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎plugins/MantisGraph/core/graph_api.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ function create_category_summary() {
752752

753753
$query = "SELECT id, name
754754
FROM $t_cat_table
755-
WHERE $specific_where
755+
WHERE $specific_where or project_id=" . ALL_PROJECTS . "
756756
ORDER BY name";
757757
$result = db_query_bound( $query );
758758
$category_count = db_num_rows( $result );
@@ -769,7 +769,8 @@ function create_category_summary() {
769769
if ( isset($t_metrics[$t_cat_name]) ) {
770770
$t_metrics[$t_cat_name] = $t_metrics[$t_cat_name] + db_result( $result2, 0, 0 );
771771
} else {
772-
$t_metrics[$t_cat_name] = db_result( $result2, 0, 0 );
772+
if (db_result( $result2, 0, 0 ) > 0)
773+
$t_metrics[$t_cat_name] = db_result( $result2, 0, 0 );
773774
}
774775
}
775776

0 commit comments

Comments
 (0)
Please sign in to comment.