diff options
author | bbaetz%acm.org <> | 2003-11-22 12:50:36 +0100 |
---|---|---|
committer | bbaetz%acm.org <> | 2003-11-22 12:50:36 +0100 |
commit | da857afa089e79ad16fb833dd1ffe397055fd892 (patch) | |
tree | 4582f630aa59c35fdb25aa30fd71c617977e0a86 /duplicates.cgi | |
parent | 63790559f094b702688365ed12242526ce3ff969 (diff) | |
download | bugzilla-da857afa089e79ad16fb833dd1ffe397055fd892.tar.gz bugzilla-da857afa089e79ad16fb833dd1ffe397055fd892.tar.xz |
Bug 208604 - Make data/template dir locations configurable
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-x | duplicates.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/duplicates.cgi b/duplicates.cgi index e8d82d2f7..5da90e7b9 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -36,6 +36,7 @@ use vars qw($buffer); use Bugzilla; use Bugzilla::Search; +use Bugzilla::Config qw(:DEFAULT $datadir); use Bugzilla::Constants; my $cgi = Bugzilla->cgi; @@ -116,10 +117,10 @@ my $yesterday = days_ago(1); use Errno; use Fcntl; -if (!tie(%dbmcount, 'AnyDBM_File', "data/duplicates/dupes$today", +if (!tie(%dbmcount, 'AnyDBM_File', "$datadir/duplicates/dupes$today", O_RDONLY, 0644)) { if ($!{ENOENT}) { - if (!tie(%dbmcount, 'AnyDBM_File', "data/duplicates/dupes$yesterday", + if (!tie(%dbmcount, 'AnyDBM_File', "$datadir/duplicates/dupes$yesterday", O_RDONLY, 0644)) { my $vars = { today => $today }; if ($!{ENOENT}) { @@ -163,7 +164,7 @@ my $dobefore = 0; my %delta; my $whenever = days_ago($changedsince); -if (!tie(%before, 'AnyDBM_File', "data/duplicates/dupes$whenever", +if (!tie(%before, 'AnyDBM_File', "$datadir/duplicates/dupes$whenever", O_RDONLY, 0644)) { # Ignore file not found errors if (!$!{ENOENT}) { |