]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 6682: moving location of graph creation dir to graphs instead of data/mining...
authorgerv%gerv.net <>
Wed, 6 Dec 2000 06:36:25 +0000 (06:36 +0000)
committergerv%gerv.net <>
Wed, 6 Dec 2000 06:36:25 +0000 (06:36 +0000)
collectstats.pl
reports.cgi

index 1458380141815ac4c141b7e639963828ef4fb771..9d813f63ed0eaf4e0b93ee26c8481cd9cdea86d1 100755 (executable)
@@ -32,10 +32,10 @@ use vars @::legal_product;
 require "globals.pl";
 
 # tidy up after graphing module
-chdir("data/mining");
-unlink <*.gif>; 
-unlink <*.png>;
-chdir("../..");
+chdir("graphs");
+unlink <./*.gif>; 
+unlink <./*.png>;
+chdir("..");
  
 ConnectToDatabase(1);
 GetVersionTable();
index d6a38c0eac505533de2a032e0a7098ef9504e5ba..0287e07ff379c8ff7626da1f27867b2ad8810da8 100755 (executable)
@@ -49,6 +49,7 @@ require "globals.pl";
 use vars qw(@legal_product); # globals from er, globals.pl
 
 my $dir = "data/mining";
+my $graph_dir = "graphs";
 
 my @status = qw (NEW ASSIGNED REOPENED);
 my %bugsperperson;
@@ -500,10 +501,10 @@ FIN
     my $type = chart_image_type();
     my $data_file = daily_stats_filename($FORM{product});
     my $image_file = chart_image_name($data_file, $type);
-    my $url_image = "$dir/" . url_quote($image_file);
+    my $url_image = "$graph_dir/" . url_quote($image_file);
 
-    if (! -e "$dir/$image_file") {
-        generate_chart("$dir/$data_file", "$dir/$image_file", $type);
+    if (! -e "$graph_dir/$image_file") {
+        generate_chart("$dir/$data_file", "$graph_dir/$image_file", $type);
     }
     
     print <<FIN;
@@ -586,7 +587,7 @@ sub generate_chart {
             if (! defined $line[$i] or $line[$i] eq '') {
                 # no data point given, don't plot (this will probably
                 # generate loads of Chart::Base warnings, but that's not
-                # our fault.
+                # our fault.)
                 push @{$data{$field}}, undef;
             }
             else {