[freeside-commits] branch FREESIDE_3_BRANCH updated. be2fd658f6437cdd96ff698b6d4f35d2e0dad13c
Ivan Kohler
ivan at freeside.biz
Fri Jul 1 10:05:45 PDT 2022
The branch, FREESIDE_3_BRANCH has been updated
via be2fd658f6437cdd96ff698b6d4f35d2e0dad13c (commit)
from 9d6b11e4f297ea8fc89051b53ac8092722e37991 (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 be2fd658f6437cdd96ff698b6d4f35d2e0dad13c
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jul 1 10:05:45 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 233125087..4c9197b7e 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