aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-03-23 03:22:34 +0000
committerlpsolit%gmail.com <>2005-03-23 03:22:34 +0000
commitd9c182c4301459f433bc8537efda462b3baad316 (patch)
tree0c5b682cac85efd4df8ecc1f4f731abd4e2530b8 /Bugzilla/Error.pm
parentBug 286669: Add dependency on Storable (diff)
downloadbugzilla-d9c182c4301459f433bc8537efda462b3baad316.tar.gz
bugzilla-d9c182c4301459f433bc8537efda462b3baad316.tar.bz2
bugzilla-d9c182c4301459f433bc8537efda462b3baad316.zip
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/Error.pm')
-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;
}