use AnyDBM_File;
use strict;
use IO::Handle;
+use Cwd;
use lib ".";
$| = 1;
# Tidy up after graphing module
+my $cwd = Cwd::getcwd();
if (chdir("graphs")) {
unlink <./*.gif>;
unlink <./*.png>;
- chdir("..");
+ # chdir("..") doesn't work if graphs is a symlink, see bug 429378
+ chdir($cwd);
}
# This is a pure command line script.
my $dbh = Bugzilla->switch_to_shadow_db();
+
# To recreate the daily statistics, run "collectstats.pl --regenerate" .
my $regenerate = 0;
if ($#ARGV >= 0 && $ARGV[0] eq "--regenerate") {
# Main Script
######################################################################
+# redirect to enter_bug if no field is passed.
+print $cgi->redirect(correct_urlbase() . 'enter_bug.cgi') unless $cgi->param();
+
# Detect if the user already used the same form to submit a bug
my $token = trim($cgi->param('token'));
if ($token) {