From d9c182c4301459f433bc8537efda462b3baad316 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 23 Mar 2005 03:22:34 +0000 Subject: Bug 280193: Round up places using data/ instead of $datadir - Patch by Marc Schumann r=LpSolit, a=justdave --- Bugzilla/Error.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Error.pm') diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index 6eac5c94b..ecc430cb5 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -26,7 +26,7 @@ use base qw(Exporter); @Bugzilla::Error::EXPORT = qw(ThrowCodeError ThrowTemplateError ThrowUserError); -use Bugzilla::Config; +use Bugzilla::Config qw($datadir); use Bugzilla::Constants; use Bugzilla::Util; use Date::Format; @@ -42,8 +42,8 @@ sub _throw_error { # and the transaction is rolled back (if supported) Bugzilla->dbh->bz_unlock_tables(UNLOCK_ABORT); - # If a writable data/errorlog exists, log error details there. - if (-w "data/errorlog") { + # If a writable $datadir/errorlog exists, log error details there. + if (-w "$datadir/errorlog") { require Data::Dumper; my $mesg = ""; for (1..75) { $mesg .= "-"; }; @@ -67,7 +67,7 @@ sub _throw_error { $val = "*****" if $val =~ /password|http_pass/i; $mesg .= "[$$] " . Data::Dumper->Dump([$val],["env($var)"]); } - open(ERRORLOGFID, ">>data/errorlog"); + open(ERRORLOGFID, ">>$datadir/errorlog"); print ERRORLOGFID "$mesg\n"; close ERRORLOGFID; } -- cgit v1.2.3-24-g4f1b