[freeside-commits] freeside/FS/FS Record.pm,1.135.2.2,1.135.2.3
Ivan,,,
ivan at wavetail.420.am
Thu Jul 5 15:05:40 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv21475
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.135.2.2
retrieving revision 1.135.2.3
diff -u -d -r1.135.2.2 -r1.135.2.3
--- Record.pm 10 Mar 2007 00:21:53 -0000 1.135.2.2
+++ Record.pm 5 Jul 2007 22:05:38 -0000 1.135.2.3
@@ -10,6 +10,8 @@
use Locale::Country;
use DBI qw(:sql_types);
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