diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-12-28 16:11:46 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-12-28 16:11:46 -0800 |
commit | 32072dbf59a054529f5304574c0f56f9567d14d0 (patch) | |
tree | eaca19adc8da8daf4b0eaaed1a16c3a8e5a53cb0 /FS/FS/router.pm | |
parent | 66c235e33563ccd785ff9e0828398f778a75fb9f (diff) |
autoload methods returning foreign records, RT#13971
Diffstat (limited to 'FS/FS/router.pm')
-rwxr-xr-x | FS/FS/router.pm | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/FS/FS/router.pm b/FS/FS/router.pm index 937dc1f..21011e7 100755 --- a/FS/FS/router.pm +++ b/FS/FS/router.pm @@ -1,12 +1,10 @@ package FS::router; +use base qw( FS::m2m_Common FS::Record ); use strict; -use vars qw( @ISA ); use FS::Record qw( qsearchs qsearch dbh ); use FS::addr_block; -@ISA = qw( FS::Record FS::m2m_Common ); - =head1 NAME FS::router - Object methods for router records @@ -209,11 +207,6 @@ is enabled. =cut -sub addr_block { - my $self = shift; - return qsearch('addr_block', { routernum => $self->routernum }); -} - sub auto_addr_block { my $self = shift; return () if $self->manual_addr; @@ -227,13 +220,6 @@ Returns a list of FS::part_svc_router objects associated with this object. This is unlikely to be useful for any purpose other than retrieving the associated FS::part_svc objects. See below. -=cut - -sub part_svc_router { - my $self = shift; - return qsearch('part_svc_router', { routernum => $self->routernum }); -} - =item part_svc Returns a list of FS::part_svc objects associated with this object. @@ -250,25 +236,12 @@ sub part_svc { Returns the agent associated with this router, if any. -=cut - -sub agent { - qsearchs('agent', { 'agentnum' => shift->agentnum }); -} - =item cust_svc Returns the cust_svc associated with this router, if any. This should be the service that I<provides connectivity to the router>, not any service connected I<through> the router. -=cut - -sub cust_svc { - my $svcnum = shift->svcnum or return undef; - FS::cust_svc->by_key($svcnum); -} - =back =head1 SEE ALSO |