[freeside-commits] freeside/FS/FS Record.pm,1.139,1.140
Ivan,,,
ivan at wavetail.420.am
Thu Jul 5 15:05:30 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv21461
Modified Files:
Record.pm
Log Message:
fix for compatibility w/DBIx::DBSchema v0.33+ (without requiring it)
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- Record.pm 29 Jun 2007 01:45:10 -0000 1.139
+++ Record.pm 5 Jul 2007 22:05:27 -0000 1.140
@@ -9,7 +9,9 @@
use File::CounterFile;
use Locale::Country;
use DBI qw(:sql_types);
-use DBIx::DBSchema 0.33;
+use DBIx::DBSchema 0.25;
+#use DBIx::DBSchema 0.33; #when check for ->can('unique_singles') is sub insert
+ #is removed
use FS::UID qw(dbh getotaker datasrc driver_name);
use FS::CurrentUser;
use FS::Schema qw(dbdef);
@@ -725,7 +727,10 @@
#single-field unique keys are given a value if false
#(like MySQL's AUTO_INCREMENT or Pg SERIAL)
- foreach ( $self->dbdef_table->unique_singles ) {
+ foreach ( $self->dbdef_table->can('unique_singles')
+ ? $self->dbdef_table->unique_singles
+ : $self->dbdef_table->unique->singles
+ ) {
$self->unique($_) unless $self->getfield($_);
}
More information about the freeside-commits
mailing list