diff options
author | mkanat%bugzilla.org <> | 2006-06-30 01:49:55 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-06-30 01:49:55 +0200 |
commit | a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2 (patch) | |
tree | c69b87d1aba4ed1d77ec33abdaccafe249bd735b /Bugzilla/Update.pm | |
parent | 38b17a8f16b21bb3dae4f1e6c01c84a5adc5d38f (diff) | |
download | bugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.gz bugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.xz |
Bug 342121: Remove usage of Config qw(:locations) in favor of Constants::bz_locations()
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Update.pm')
-rw-r--r-- | Bugzilla/Update.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Update.pm b/Bugzilla/Update.pm index a672bd8bb..1aef2bf17 100644 --- a/Bugzilla/Update.pm +++ b/Bugzilla/Update.pm @@ -18,10 +18,10 @@ package Bugzilla::Update; use strict; -use Bugzilla::Config qw($datadir); +use Bugzilla::Constants; use constant REMOTE_FILE => 'http://updates.bugzilla.org/bugzilla-update.xml'; -use constant LOCAL_FILE => "/bugzilla-update.xml"; # Relative to $datadir. +use constant LOCAL_FILE => "/bugzilla-update.xml"; # Relative to datadir. use constant TIME_INTERVAL => 604800; # Default is one week, in seconds. use constant TIMEOUT => 5; # Number of seconds before timeout. @@ -34,7 +34,7 @@ sub get_notifications { eval("require XML::Twig"); return if $@; - my $local_file = $datadir . LOCAL_FILE; + my $local_file = bz_locations()->{'datadir'} . LOCAL_FILE; # Update the local XML file if this one doesn't exist or if # the last modification time (stat[9]) is older than TIME_INTERVAL. if (!-e $local_file || (time() - (stat($local_file))[9] > TIME_INTERVAL)) { @@ -127,7 +127,7 @@ sub _synchronize_data { eval("require LWP::UserAgent"); return if $@; - my $local_file = $datadir . LOCAL_FILE; + my $local_file = bz_locations()->{'datadir'} . LOCAL_FILE; my $ua = LWP::UserAgent->new(); $ua->timeout(TIMEOUT); |