diff options
author | lpsolit%gmail.com <> | 2005-08-05 07:58:59 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-08-05 07:58:59 +0000 |
commit | 72bdf0f920380807b1da4bb5be3523e65f618182 (patch) | |
tree | 13eb1d7e90159e4ce26074b97308782ee658ac3e /importxml.pl | |
parent | Bug 302718: Enable All Mail enables also unchangeable Reporter/Voter checkbox... (diff) | |
download | bugzilla-72bdf0f920380807b1da4bb5be3523e65f618182.tar.gz bugzilla-72bdf0f920380807b1da4bb5be3523e65f618182.tar.bz2 bugzilla-72bdf0f920380807b1da4bb5be3523e65f618182.zip |
Bug 288170: importxml.pl and move.pl should not write to $datadir/maillog - Patch by Olav Vitters <bugzilla-mozilla@bkor.dhs.org> r=LpSolit a=justdave
Diffstat (limited to 'importxml.pl')
-rwxr-xr-x | importxml.pl | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/importxml.pl b/importxml.pl index b8e017412..0d9dcb868 100755 --- a/importxml.pl +++ b/importxml.pl @@ -71,7 +71,6 @@ use Bugzilla::User; require "CGI.pl"; require "globals.pl"; -$::lockcount = 0; GetVersionTable(); @@ -117,40 +116,6 @@ sub MailMessage { my $sendmessage = $header . $message . "\n"; Bugzilla::BugMail::MessageToMTA($sendmessage); - - Log($subject . " sent to: $to"); -} - - -sub Log { - my ($str) = (@_); - Lock(); - open(FID, ">>$datadir/maillog") || die "Can't write to $datadir/maillog"; - print FID time2str("%D %H:%M", time()) . ": $str\n"; - close FID; - Unlock(); -} - -sub Lock { - if ($::lockcount <= 0) { - $::lockcount = 0; - open(LOCKFID, ">>$datadir/maillock") || die "Can't open $datadir/maillock: $!"; - my $val = flock(LOCKFID,2); - if (!$val) { # '2' is magic 'exclusive lock' const. - print Bugzilla->cgi->header(); - print "Lock failed: $val\n"; - } - chmod 0666, "$datadir/maillock"; - } - $::lockcount++; -} - -sub Unlock { - $::lockcount--; - if ($::lockcount <= 0) { - flock(LOCKFID,8); # '8' is magic 'unlock' const. - close LOCKFID; - } } |