Index: /home/sogabe/public_html/mantis/summary_graph_bycategory.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_category' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 	
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_category_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_priority' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_priority_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_priority_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_resolution' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_group( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_resolution_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_resolution_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_severity' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_severity_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_severity_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );		
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_status' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_status_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_jpgraph_page.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(working copy)
@@ -38,6 +38,8 @@
 	$t_wide = config_get( 'graph_summary_graphs_per_row' );
 	$t_width = config_get( 'graph_window_width' );
 	$t_graph_width = (int) ( ( $t_width - 50 ) / $t_wide );
+	
+	token_delete( TOKEN_GRAPH );
 
 ?>
 
