RSS

(root)/bugzilla/3.6 : 3283 : Bugzilla/Error.pm

To get this branch, use:
bzr branch /bugzilla/3.6

« back to all changes in this revision

Viewing changes to Bugzilla/Error.pm

lpsolit%gmail.com
2005-03-22 19:22:34
Revision ID: cvs-1:lpsolitgmail.com-20050323032234-3yolr0y1t0ono8s9
Bug 280193: Round up places using data/ instead of $datadir - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit, a=justdave

Show diffs side-by-side

added added

removed removed

26
26
 
27
27
@Bugzilla::Error::EXPORT = qw(ThrowCodeError ThrowTemplateError ThrowUserError);
28
28
 
29
 
use Bugzilla::Config;
 
29
use Bugzilla::Config qw($datadir);
30
30
use Bugzilla::Constants;
31
31
use Bugzilla::Util;
32
32
use Date::Format;
42
42
    # and the transaction is rolled back (if supported)
43
43
    Bugzilla->dbh->bz_unlock_tables(UNLOCK_ABORT);
44
44
 
45
 
    # If a writable data/errorlog exists, log error details there.
46
 
    if (-w "data/errorlog") {
 
45
    # If a writable $datadir/errorlog exists, log error details there.
 
46
    if (-w "$datadir/errorlog") {
47
47
        require Data::Dumper;
48
48
        my $mesg = "";
49
49
        for (1..75) { $mesg .= "-"; };
67
67
            $val = "*****" if $val =~ /password|http_pass/i;
68
68
            $mesg .= "[$$] " . Data::Dumper->Dump([$val],["env($var)"]);
69
69
        }
70
 
        open(ERRORLOGFID, ">>data/errorlog");
 
70
        open(ERRORLOGFID, ">>$datadir/errorlog");
71
71
        print ERRORLOGFID "$mesg\n";
72
72
        close ERRORLOGFID;
73
73
    }

Loggerhead 1.18.1 is a web-based interface for Bazaar branches