Index: trunk/tools/czartool/CzarDb.pm
===================================================================
--- trunk/tools/czartool/CzarDb.pm	(revision 28719)
+++ trunk/tools/czartool/CzarDb.pm	(revision 28752)
@@ -2,5 +2,4 @@
 
 package czartool::CzarDb;
-
 
 use warnings;
@@ -10,5 +9,4 @@
 
 my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO put elsewhere
-
 
 use base 'czartool::MySQLDb';
@@ -20,5 +18,5 @@
 
     # Call the constructor of the parent class, Person.
-    my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4],  $_[5]);
+    my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4],  $_[5], $_[6]);
 
     bless $self, $class;
@@ -147,7 +145,7 @@
 ###########################################################################
 sub getTimeDifference { # TODO fix this
-    my ($self, $save_temps, $fromTime, $toTime) = @_; # TODO save_temps should be constructor arg
-
-    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$save_temps);
+    my ($self, $fromTime, $toTime) = @_; 
+
+    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps});
 
     my $query = $self->{_db}->prepare(<<SQL);
@@ -167,7 +165,7 @@
 ###########################################################################
 sub createTimeSeriesData {
-    my ($self, $save_temps, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; # TODO save_temps should be constructor arg
-
-    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$save_temps);
+    my ($self, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_;
+
+    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps});
 
     my $query = $self->{_db}->prepare(<<SQL);
