[freeside-commits] branch FREESIDE_4_BRANCH updated. 6132541132dc1be466436c7a3809a0c23fce4e2f
Ivan Kohler
ivan at freeside.biz
Fri Jul 1 10:05:42 PDT 2022
The branch, FREESIDE_4_BRANCH has been updated
via 6132541132dc1be466436c7a3809a0c23fce4e2f (commit)
from 4ff0725a89f9bc8678c046648ebd803fbd82f740 (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 6132541132dc1be466436c7a3809a0c23fce4e2f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jul 1 10:05:41 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