[freeside-commits] branch master updated. 86fb4649060ed26420bb1931481885064e76abc5
Ivan Kohler
ivan at freeside.biz
Fri Jul 1 10:05:39 PDT 2022
The branch, master has been updated
via 86fb4649060ed26420bb1931481885064e76abc5 (commit)
from 7fa372b7beec7595c22708755fbf753193496313 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 86fb4649060ed26420bb1931481885064e76abc5
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jul 1 10:05:38 2022 -0700
fix manually setting cdrtypenum or carrierid to 0, RT#86028
diff --git a/FS/bin/freeside-cdr-sftp_and_import b/FS/bin/freeside-cdr-sftp_and_import
index bae805151..f2bf2944f 100755
--- a/FS/bin/freeside-cdr-sftp_and_import
+++ b/FS/bin/freeside-cdr-sftp_and_import
@@ -21,8 +21,8 @@ $opt_e =~ s/^\.//;
$opt_p ||= '';
-die "invalid cdrtypenum" if $opt_c && $opt_c !~ /^\d+$/;
-die "invalid carrierid" if $opt_i && $opt_i !~ /^\d+$/;
+die "invalid cdrtypenum" if defined $opt_c && $opt_c !~ /^\d+$/;
+die "invalid carrierid" if defined $opt_i && $opt_i !~ /^\d+$/;
my %options = ();
@@ -114,8 +114,8 @@ foreach my $filename ( @$ls ) {
'batch_namevalue' => $file_timestamp,
'empty_ok' => 1,
};
- $import_options->{'cdrtypenum'} = $opt_c if $opt_c;
- $import_options->{'carrierid'} = $opt_i if $opt_i;
+ $import_options->{'cdrtypenum'} = $opt_c if defined $opt_c;
+ $import_options->{'carrierid'} = $opt_i if defined $opt_i;
my $error = FS::cdr::batch_import($import_options);
@@ -164,7 +164,7 @@ foreach my $filename ( @$ls ) {
sub usage {
"Usage:
- cdr.sftp_and_import [ -m method ] [ -p prefix ] [ -e extension ]
+ freeside-cdr-sftp_and_import [ -m method ] [ -p prefix ] [ -e extension ]
[ -r remotefolder ] [ -d donefolder ] [ -v level ] [ -P port ]
[ -a ] [ -g ] [ -s ] [ -c cdrtypenum ] user format [sftpuser@]servername
";
-----------------------------------------------------------------------
Summary of changes:
FS/bin/freeside-cdr-sftp_and_import | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list