[freeside-commits] freeside/FS/FS part_svc.pm, 1.20,
1.21 part_virtual_field.pm, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Wed Sep 7 03:41:00 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv23023
Modified Files:
part_svc.pm part_virtual_field.pm
Log Message:
import dbdef from FS::Schema instead of calling $FS::Record::dbdef directly
Index: part_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_svc.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- part_svc.pm 24 Feb 2005 14:24:07 -0000 1.20
+++ part_svc.pm 7 Sep 2005 10:40:58 -0000 1.21
@@ -3,6 +3,7 @@
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 @@
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 )
)
} );
Index: part_virtual_field.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_virtual_field.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- part_virtual_field.pm 26 Nov 2004 09:39:52 -0000 1.3
+++ part_virtual_field.pm 7 Sep 2005 10:40:58 -0000 1.4
@@ -2,7 +2,8 @@
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 @@
# 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
More information about the freeside-commits
mailing list