summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2010-09-19 05:55:09 +0000
committerivan <ivan>2010-09-19 05:55:09 +0000
commit3fbf293ee485c7b9245d1fadeb69c9b06ec075ed (patch)
tree2b4b55616290fd2705b94fad029c768dd7f20ea2 /FS
parent04018dedb1ee318ac7d63c3f9c039edf4a8d0537 (diff)
fix a series of unfortunate upgrades which resulted in too much payment receiptery, RT#9723
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_pay.pm2
-rwxr-xr-xFS/bin/freeside-upgrade10
2 files changed, 10 insertions, 2 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm
index 1fd39ac67..9985f59c7 100644
--- a/FS/FS/cust_pay.pm
+++ b/FS/FS/cust_pay.pm
@@ -447,7 +447,7 @@ sub send_receipt {
my $conf = new FS::Conf;
- return unless $conf->exists('payment_receipt');
+ return '' unless $conf->exists('payment_receipt');
my @invoicing_list = $cust_main->invoicing_list_emailonly;
return '' unless @invoicing_list;
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade
index e22afa26c..d3723a188 100755
--- a/FS/bin/freeside-upgrade
+++ b/FS/bin/freeside-upgrade
@@ -11,7 +11,7 @@ use FS::Schema qw( dbdef dbdef_dist reload_dbdef );
use FS::Misc::prune qw(prune_applications);
use FS::Conf;
use FS::Record qw(qsearch);
-use FS::Upgrade qw(upgrade_schema upgrade upgrade_sqlradius);
+use FS::Upgrade qw(upgrade_schema upgrade_config upgrade upgrade_sqlradius);
my $start = time;
@@ -199,6 +199,14 @@ $dbh = adminsuidsetup($user);
warn "Re-initialization with updated schema completed in ". (time-$start). " seconds\n"; # if $DEBUG;
$start = time;
+upgrade_config()
+ unless $DRY_RUN || $opt_s;
+
+$dbh->commit or die $dbh->errstr;
+
+warn "Config updates completed in ". (time-$start). " seconds\n"; # if $DEBUG;
+$start = time;
+
upgrade()
unless $DRY_RUN || $opt_s;