--- C:/Documents and Settings/sdelfranco/Escritorio/mantis/mantisbt-1.2.1-official/core/html_api.php Fri Apr 23 14:28:34 2010 +++ C:/Documents and Settings/sdelfranco/Escritorio/mantis/mantisbt-1.2.1-patches/core/html_api.php Mon Jun 14 12:51:37 2010 @@ -1251,6 +1251,7 @@ * @return null */ function html_status_percentage_legend() { + global $g_private_bug_threshold; $t_mantis_bug_table = db_get_table( 'mantis_bug_table' ); $t_project_id = helper_get_current_project(); $t_user_id = auth_get_current_user_id(); @@ -1260,8 +1261,11 @@ $query = "SELECT status, COUNT(*) AS number FROM $t_mantis_bug_table - WHERE $t_specific_where - GROUP BY status"; + WHERE $t_specific_where"; + if($g_private_bug_threshold > access_get_project_level($t_project_id, $t_user_id)) { + $query .= ' AND view_state < '.VS_PRIVATE; + } + $query .= "GROUP BY status"; $result = db_query_bound( $query ); $t_bug_count = 0;