diff options
author | ivan <ivan> | 2008-10-07 23:57:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-10-07 23:57:43 +0000 |
commit | 9d74cea56767d887c7b0a26ec337feb1ff05b96a (patch) | |
tree | db6df9d7f1ba5a470870941dc608b5d5e8cbf6bc /httemplate | |
parent | 235173ad9493f90dba2842cd33aa886cacbbee15 (diff) |
put each CDR web import into a batch
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/cdr-import.html | 4 | ||||
-rw-r--r-- | httemplate/misc/process/cdr-import.html | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/misc/cdr-import.html b/httemplate/misc/cdr-import.html index b46607869..62e38b29b 100644 --- a/httemplate/misc/cdr-import.html +++ b/httemplate/misc/cdr-import.html @@ -11,6 +11,8 @@ CDR Format: Filename: <INPUT TYPE="file" NAME="csvfile"><BR><BR> +<INPUT TYPE="hidden" NAME="cdrbatch" VALUE="<% $cdrbatch %>"%> + <INPUT TYPE="submit" VALUE="Upload"> </FORM> @@ -23,4 +25,6 @@ die "access denied" tie my %formats, 'Tie::IxHash', FS::cdr->import_formats; +my $cdrbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + </%init> diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html index 4848fa325..7c4bf2b59 100644 --- a/httemplate/misc/process/cdr-import.html +++ b/httemplate/misc/process/cdr-import.html @@ -15,7 +15,8 @@ my $fh = $cgi->upload('csvfile'); my $error = defined($fh) ? FS::cdr::batch_import( { 'filehandle' => $fh, - 'format' => $cgi->param('format'), + 'format' => scalar($cgi->param('format')), + 'cdrbatch' => scalar($cgi->param('cdrbatch')), } ) : 'No file'; |