[freeside-commits] branch master updated. 983bf2cafbc04efe2368c67d88610ebfbbbae00a

Christopher Burger burgerc at freeside.biz
Thu Mar 29 08:16:41 PDT 2018


The branch, master has been updated
       via  983bf2cafbc04efe2368c67d88610ebfbbbae00a (commit)
      from  c128c075054a208e97a6815d5920892a0b75d33b (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 983bf2cafbc04efe2368c67d88610ebfbbbae00a
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Thu Mar 29 11:16:09 2018 -0400

    RT78356 - fixed exportname error added missing file

diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi
index 381fbcaf8..f6ec208be 100644
--- a/httemplate/edit/part_export.cgi
+++ b/httemplate/edit/part_export.cgi
@@ -293,7 +293,7 @@ my $widget = new HTML::Widgets::SelectLayers(
     foreach my $script ( keys %{$exports->{$layer}{scripts}} ) {
       $html .= '<TR><TD ALIGN="left" COLSPAN=2>' .
         include('/elements/progress-init.html',
-              $part_export->exportname,
+              $part_export->exporttype,
               [ $script.'_exportnum', $script.'_script' ],
               rooturl().'view/svc_export/run_script.cgi',
               rooturl().'edit/part_export.cgi?'.$part_export->{Hash}->{exportnum},
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

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/part_export.cgi           |  2 +-
 httemplate/view/svc_export/run_script.cgi | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 httemplate/view/svc_export/run_script.cgi




More information about the freeside-commits mailing list