From c41117346f48774e5c6731303702b5ce98db517b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 21 Jun 2006 07:44:46 +0000 Subject: Bug 282121: Remove globals.pl from scripts that no longer use it - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/bug_email.pl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'contrib/bug_email.pl') diff --git a/contrib/bug_email.pl b/contrib/bug_email.pl index 546c08dc5..5f95e9272 100755 --- a/contrib/bug_email.pl +++ b/contrib/bug_email.pl @@ -38,7 +38,7 @@ # # You need to work with bug_email.pl the MIME::Parser installed. # -# $Id: bug_email.pl,v 1.41 2006/06/19 17:30:24 lpsolit%gmail.com Exp $ +# $Id: bug_email.pl,v 1.42 2006/06/21 00:44:48 lpsolit%gmail.com Exp $ ############################################################### # 02/12/2000 (SML) @@ -73,7 +73,7 @@ # - querying a bug over email # - appending a bug over email # - keywords over email -# - use the globals.pl parameters functionality to edit and save this script's parameters +# - use the Bugzilla parameters functionality to edit and save this script's parameters # - integrate some setup in the checksetup.pl script # - gpg signatures for security @@ -86,14 +86,14 @@ BEGIN { push @INC, "."; } -require "globals.pl"; -use Bugzilla; -use BugzillaEmail; -use Bugzilla::Config qw(:DEFAULT $datadir); - use lib "."; use lib "../"; + +use Bugzilla; +use BugzillaEmail; +use Bugzilla::Config qw(:DEFAULT); use Bugzilla::Constants; +use Bugzilla::Util; use Bugzilla::BugMail; use Bugzilla::User; use Bugzilla::Product; @@ -228,7 +228,7 @@ sub Reply( $$$$ ) { die "Cannot find sender-email-address" unless defined( $Sender ); if( $test ) { - open( MAIL, '>>', "$datadir/bug_email_test.log" ); + open( MAIL, '>>', bz_locations()->{'datadir'} . "/bug_email_test.log" ); } else { open( MAIL, "| /usr/sbin/sendmail -t" ); @@ -669,6 +669,7 @@ my $parser = new MIME::Parser; # Create and set the output directory: # FIXME: There should be a $BUGZILLA_HOME variable (SML) +my $datadir = bz_locations()->{'datadir'}; (-d "$datadir/mimedump-tmp") or mkdir "$datadir/mimedump-tmp",0755 or die "mkdir: $!"; (-w "$datadir/mimedump-tmp") or die "can't write to directory"; -- cgit v1.2.3-24-g4f1b