freeside/FS/FS h_Common.pm,1.4,1.5
Kristian Hoffmann
khoff at pouncequick.420.am
Tue Apr 5 17:50:39 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv20499
Modified Files:
h_Common.pm
Log Message:
$pkey should be the primary key of the real table, not the history table.
Index: h_Common.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/h_Common.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- h_Common.pm 30 Mar 2005 21:40:06 -0000 1.4
+++ h_Common.pm 6 Apr 2005 00:50:36 -0000 1.5
@@ -40,8 +40,9 @@
my( $self, $end ) = ( shift, shift );
my $table = $self->table;
- my $pkey = dbdef->table($table)->primary_key
- or die "can't (yet) search history table $table without a primary key";
+ my $real_table = ($table =~ /^h_(.*)$/) ? $1 : $table;
+ my $pkey = dbdef->table($real_table)->primary_key
+ or die "can't (yet) search history table $real_table without a primary key";
unless ($end) {
confess 'Called sql_h_search without END_TIMESTAMP';
More information about the freeside-commits
mailing list