summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-03-23 04:22:34 +0100
committerlpsolit%gmail.com <>2005-03-23 04:22:34 +0100
commitd9c182c4301459f433bc8537efda462b3baad316 (patch)
tree0c5b682cac85efd4df8ecc1f4f731abd4e2530b8 /Bugzilla
parente52d541e70016e2e6414703408b8ad3505464213 (diff)
downloadbugzilla-d9c182c4301459f433bc8537efda462b3baad316.tar.gz
bugzilla-d9c182c4301459f433bc8537efda462b3baad316.tar.xz
Bug 280193: Round up places using data/ instead of $datadir - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Error.pm8
1 files changed, 4 insertions, 4 deletions
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;
}