summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_export/run_script.cgi
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-03-29 11:16:09 -0400
committerChristopher Burger <burgerc@freeside.biz>2018-03-29 11:18:54 -0400
commit0a007372bf4d39c9af24d2a348b0f12462c6391f (patch)
tree8b4ac0d7018f963becc7ffca90a796920e28c276 /httemplate/view/svc_export/run_script.cgi
parentda355fb20a69bbe5710ce7dca16e2c84a207a084 (diff)
RT78356 - fixed exportname error added missing file
Diffstat (limited to 'httemplate/view/svc_export/run_script.cgi')
-rw-r--r--httemplate/view/svc_export/run_script.cgi31
1 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/view/svc_export/run_script.cgi b/httemplate/view/svc_export/run_script.cgi
new file mode 100644
index 000000000..ba58bbdd7
--- /dev/null
+++ b/httemplate/view/svc_export/run_script.cgi
@@ -0,0 +1,31 @@
+<% $server->process %>
+<%init>
+
+my @args = $cgi->param('arg');
+my %param = ();
+ while ( @args ) {
+ my( $field, $value ) = splice(@args, 0, 2);
+ unless ( exists( $param{$field} ) ) {
+ $param{$field} = $value;
+ } elsif ( ! ref($param{$field}) ) {
+ $param{$field} = [ $param{$field}, $value ];
+ } else {
+ push @{$param{$field}}, $value;
+ }
+ }
+
+my $exportnum;
+my $method;
+for (grep /^*_script$/, keys %param) {
+ $exportnum = $param{$param{$_}.'_exportnum'};
+ $method = $param{$param{$_}.'_script'};
+}
+
+my $part_export = qsearchs('part_export', { 'exportnum'=> $exportnum, } )
+ or die "unknown exportnum $exportnum";
+
+my $class = 'FS::part_export::'.$part_export->{Hash}->{exporttype}.'::'.$method;
+
+my $server = new FS::UI::Web::JSRPC $class, $cgi;
+
+</%init> \ No newline at end of file