From a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 29 Jun 2006 23:49:55 +0000 Subject: Bug 342121: Remove usage of Config qw(:locations) in favor of Constants::bz_locations() Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- Bugzilla/Update.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Update.pm') 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); -- cgit v1.2.3-24-g4f1b