From a39d4a1fccda8c95157c6667c66b22b75b4f1e03 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 19 Sep 2003 04:13:33 +0000 Subject: [PATCH] deprecate signup_server-quiet config option --- FS/FS/Conf.pm | 4 ++-- FS/FS/cust_main.pm | 2 ++ FS/FS/cust_pkg.pm | 11 +++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 36d55e4a8..5ad109942 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -895,8 +895,8 @@ httemplate/docs/config.html { 'key' => 'signup_server-quiet', - 'section' => '', - 'description' => 'Disable decline and cancel emails generated by transactions initiated by the signup server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill. Does not disable welcome emails.', + 'section' => 'deprecated', + 'description' => ''DEPRECATED, the signup server is now part of the self-service server and no longer sends superfluous decline and cancel emails. Used to disable decline and cancel emails generated by transactions initiated by the signup server. Does not disable welcome emails.', 'type' => 'checkbox', }, diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 997f096fc..a92f1a3ed 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1299,6 +1299,8 @@ report_badcard - This option is deprecated. force_print - This option is deprecated; see the invoice events web interface. +quiet - set true to surpress email card/ACH decline notices. + =cut sub collect { diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index f59b45ab1..9a54b95c9 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2,7 +2,6 @@ package FS::cust_pkg; use strict; use vars qw(@ISA $disable_agentcheck); -use vars qw( $quiet ); use FS::UID qw( getotaker dbh ); use FS::Record qw( qsearch qsearchs ); use FS::Misc qw( send_email ); @@ -252,18 +251,22 @@ sub check { $self->SUPER::check; } -=item cancel +=item cancel [ OPTION => VALUE ... ] Cancels and removes all services (see L and L) in this package, then cancels the package itself (sets the cancel field to now). +Available options are: I + +I can be set true to supress email cancellation notices. + If there is an error, returns the error, otherwise returns false. =cut sub cancel { - my $self = shift; + my( $self, %options ) = @_; my $error; local $SIG{HUP} = 'IGNORE'; @@ -304,7 +307,7 @@ sub cancel { my $conf = new FS::Conf; my @invoicing_list = grep { $_ ne 'POST' } $self->cust_main->invoicing_list; - if ( !$quiet && $conf->exists('emailcancel') && @invoicing_list ) { + if ( !$options{'quiet'} && $conf->exists('emailcancel') && @invoicing_list ) { my $conf = new FS::Conf; my $error = send_email( 'from' => $conf->config('invoice_from'), -- 2.11.0