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:16:09 -0400
commit983bf2cafbc04efe2368c67d88610ebfbbbae00a (patch)
tree12105108b888b617171a9dcc8b9b6555b4a9547f /httemplate/view/svc_export/run_script.cgi
parentc128c075054a208e97a6815d5920892a0b75d33b (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 0000000..ba58bbd
--- /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