From: <thr...@us...> - 2008-03-01 01:23:20
|
Revision: 5068 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5068&view=rev Author: thraxisp Date: 2008-02-29 17:23:13 -0800 (Fri, 29 Feb 2008) Log Message: ----------- fix for #8887: Graph legend displays default status names Modified Paths: -------------- trunk/mantisbt/bug_graph_bystatus.php trunk/mantisbt/core/graph_api.php Modified: trunk/mantisbt/bug_graph_bystatus.php =================================================================== --- trunk/mantisbt/bug_graph_bystatus.php 2008-02-29 22:32:52 UTC (rev 5067) +++ trunk/mantisbt/bug_graph_bystatus.php 2008-03-01 01:23:13 UTC (rev 5068) @@ -63,8 +63,8 @@ exit(); } - $t_bug_table = config_get( 'mantis_bug_table' ); - $t_bug_hist_table = config_get( 'mantis_bug_history_table' ); + $t_bug_table = db_get_table( 'mantis_bug_table' ); + $t_bug_hist_table = db_get_table( 'mantis_bug_history_table' ); $t_marker = array(); $t_data = array(); @@ -74,6 +74,7 @@ // grab all status levels $t_status_arr = get_enum_to_array( config_get( 'status_enum_string' ) ); + $t_status_labels = get_enum_to_array( lang_get( 'status_enum_string' ) ); $t_bug = array(); $t_view_status = array(); @@ -175,12 +176,12 @@ $t_labels = array(); $i = 0; if ($f_summary) { - $t_labels[++$i] = 'open'; - $t_labels[++$i] = 'resolved'; - $t_labels[++$i] = 'closed'; + $t_labels[++$i] = lang_get_defaulted('open'); + $t_labels[++$i] = lang_get_defaulted('resolved'); + $t_labels[++$i] = lang_get_defaulted('closed'); } else { foreach ( $t_view_status as $t_status => $t_label ) { - $t_labels[++$i] = $t_label; + $t_labels[++$i] = isset($t_status_labels[$t_status]) ? $t_status_labels[$t_status] : lang_get_defaulted($t_label); } } $t_label_count = $i; Modified: trunk/mantisbt/core/graph_api.php =================================================================== --- trunk/mantisbt/core/graph_api.php 2008-02-29 22:32:52 UTC (rev 5067) +++ trunk/mantisbt/core/graph_api.php 2008-03-01 01:23:13 UTC (rev 5068) @@ -380,7 +380,7 @@ $t_line[$i] = new LinePlot($p_metrics[$i], $p_metrics[0]); $t_line[$i]->SetColor($t_line_colours[$i % $t_count_colours]); $t_line[$i]->SetCenter(); - $t_line[$i]->SetLegend( lang_get_defaulted( $p_labels[$i] ) ); + $t_line[$i]->SetLegend( $p_labels[$i] ); $graph->Add($t_line[$i]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |