From b403c08477da81266b789e103767f096daff4828 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Sat, 31 Jan 2015 00:27:01 -0600 Subject: [PATCH] #30613 Can't Send E-mail (Additional fixes for upgrade) --- FS/FS/Upgrade.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 9187cab40..314622288 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -70,7 +70,7 @@ sub upgrade_config { upgrade_invoice_from($conf); foreach my $agent (@agents) { - upgrade_invoice_from($conf,$agent->agentnum); + upgrade_invoice_from($conf,$agent->agentnum,1); } my $DIST_CONF = '/usr/local/etc/freeside/default_conf/';#DIST_CONF in Makefile @@ -167,10 +167,10 @@ sub upgrade_overlimit_groups { } sub upgrade_invoice_from { - my ($conf, $agentnum) = @_; + my ($conf, $agentnum, $agentonly) = @_; if ( - (!$conf->config('invoice_from_name',$agentnum)) && - ($conf->config('invoice_from',$agentnum) =~ /\<(.*)\>/) + (!$conf->exists('invoice_from_name',$agentnum,$agentonly)) && + ($conf->config('invoice_from',$agentnum,$agentonly) =~ /\<(.*)\>/) ) { my $realemail = $1; $realemail =~ s/^\s*//; # remove leading spaces -- 2.11.0