projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f3fb71c
)
$pkey should be the primary key of the real table, not the history table.
author
khoff
<khoff>
Wed, 6 Apr 2005 00:50:36 +0000
(
00:50
+0000)
committer
khoff
<khoff>
Wed, 6 Apr 2005 00:50:36 +0000
(
00:50
+0000)
FS/FS/h_Common.pm
patch
|
blob
|
history
diff --git
a/FS/FS/h_Common.pm
b/FS/FS/h_Common.pm
index
e575cff
..
d55da8c
100644
(file)
--- a/
FS/FS/h_Common.pm
+++ b/
FS/FS/h_Common.pm
@@
-40,8
+40,9
@@
sub sql_h_search {
my( $self, $end ) = ( shift, shift );
my $table = $self->table;
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';
unless ($end) {
confess 'Called sql_h_search without END_TIMESTAMP';