diff options
author | ivan <ivan> | 2005-09-07 10:40:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-09-07 10:40:58 +0000 |
commit | 2aa5c02ab333809f44d74140249fbf610233c0fd (patch) | |
tree | aed362d0b2260cd2a0f47ff4a220ece6f1d04928 /FS | |
parent | ebbcc911db8bd989b8af34d0239ba32887f59c13 (diff) |
import dbdef from FS::Schema instead of calling $FS::Record::dbdef directly
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/part_svc.pm | 3 | ||||
-rwxr-xr-x | FS/FS/part_virtual_field.pm | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index e94c803b7..2bb8ab59e 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -3,6 +3,7 @@ package FS::part_svc; use strict; use vars qw( @ISA $DEBUG ); use FS::Record qw( qsearch qsearchs fields dbh ); +use FS::Schema qw( dbdef ); use FS::part_svc_column; use FS::part_export; use FS::export_svc; @@ -465,7 +466,7 @@ sub process { my @fields = fields($svcdb); push @fields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge map { ( $svcdb.'__'.$_, $svcdb.'__'.$_.'_flag' ) } @fields; - } grep defined( $FS::Record::dbdef->table($_) ), + } grep defined( dbdef->table($_) ), qw( svc_acct svc_domain svc_forward svc_www svc_broadband ) ) } ); diff --git a/FS/FS/part_virtual_field.pm b/FS/FS/part_virtual_field.pm index f6a8fe745..992d4496e 100755 --- a/FS/FS/part_virtual_field.pm +++ b/FS/FS/part_virtual_field.pm @@ -2,7 +2,8 @@ package FS::part_virtual_field; use strict; use vars qw( @ISA ); -use FS::Record qw( qsearchs qsearch dbdef ); +use FS::Record qw( qsearchs qsearch ); +use FS::Schema qw( dbdef ); @ISA = qw( FS::Record ); @@ -161,7 +162,7 @@ sub check { # Make sure it's a real table with a numeric primary key my ($table, $pkey); - if($table = $FS::Record::dbdef->table($self->dbtable)) { + if($table = dbdef->table($self->dbtable)) { if($pkey = $table->primary_key) { if($table->column($pkey)->type =~ /int/i) { # this is what it should be |