summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-30 18:46:05 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-30 18:46:05 -0700
commit960e5018d7e63f96f57fed4a56a2c1b700e8a64e (patch)
tree490b17a0d2cee9cb78f0e68f55275c6ed9c6eaf9 /FS
parent3c4b8a30aa8b650795b6f74c587f57feab348ab6 (diff)
use a separate table for freesidestatus for IVR imports, RT#39055
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cdr/Import.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/FS/FS/cdr/Import.pm b/FS/FS/cdr/Import.pm
index ca6ae936c..a97472e7a 100644
--- a/FS/FS/cdr/Import.pm
+++ b/FS/FS/cdr/Import.pm
@@ -81,7 +81,7 @@ sub dbi_import {
# )
#my @cols = values %{ $args{column_map} };
- my $sql = "SELECT * FROM $table "; # join(',', @cols). " FROM $table ".
+ my $sql = "SELECT $table.* FROM $table "; # join(',', @cols). " FROM $table ".
$sql .= 'LEFT JOIN '. $args{status_table}.
" ON ( $table.$pkey = ". $args{status_table}. ".$pkey )"
if $args{status_table};
@@ -117,8 +117,7 @@ sub dbi_import {
$cdr->cdrtypenum($opt{c}) if $opt{c};
- my $pkey_value = $args{status_table} ? $row->{"$table.$pkey"}
- : $row->{$pkey};
+ my $pkey_value = $row->{$pkey};
#print "$pkey_value\n" if $opt{v};
my $error = $cdr->insert;