[freeside-commits] freeside/FS/FS svc_Common.pm,1.39.2.7,1.39.2.8
Ivan,,,
ivan at wavetail.420.am
Tue Aug 4 15:05:02 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29163/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
svc_Common.pm
Log Message:
ignore problams calling ->overlimit during sqlradius-reset, wtf?! RT#5868
Index: svc_Common.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_Common.pm,v
retrieving revision 1.39.2.7
retrieving revision 1.39.2.8
diff -u -d -r1.39.2.7 -r1.39.2.8
--- svc_Common.pm 23 Mar 2009 17:02:34 -0000 1.39.2.7
+++ svc_Common.pm 4 Aug 2009 22:05:00 -0000 1.39.2.8
@@ -1,8 +1,9 @@
package FS::svc_Common;
use strict;
-use vars qw( @ISA $noexport_hack $DEBUG $me );
-use Carp qw( cluck carp croak ); #specify cluck have to specify them all..
+use vars qw( @ISA $noexport_hack $DEBUG $me
+ $overlimit_missing_cust_svc_nonfatal_kludge );
+use Carp qw( cluck carp croak confess ); #specify cluck have to specify them all
use FS::Record qw( qsearch qsearchs fields dbh );
use FS::cust_main_Mixin;
use FS::cust_svc;
@@ -17,6 +18,8 @@
$me = '[FS::svc_Common]';
$DEBUG = 0;
+$overlimit_missing_cust_svc_nonfatal_kludge = 0;
+
=head1 NAME
FS::svc_Common - Object method for all svc_ records
@@ -755,7 +758,19 @@
sub overlimit {
my $self = shift;
- $self->cust_svc->overlimit(@_);
+ #$self->cust_svc->overlimit(@_);
+ my $cust_svc = $self->cust_svc;
+ unless ( $cust_svc ) { #wtf?
+ my $error = "$me overlimit: missing cust_svc record for svc_acct svcnum ".
+ $self->svcnum;
+ if ( $overlimit_missing_cust_svc_nonfatal_kludge ) {
+ cluck "$error; continuing anyway as requested";
+ return '';
+ } else {
+ confess $error;
+ }
+ }
+ $cust_svc->overlimit(@_);
}
=item cancel
More information about the freeside-commits
mailing list