From: ivan Date: Fri, 29 Jan 2010 19:52:42 +0000 (+0000) Subject: ssl option X-Git-Tag: root_of_svc_elec_features~502 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0bce5a5f0333e72f746af9339484707d2b9d3f95 ssl option --- diff --git a/FS/FS/part_export/thirdlane.pm b/FS/FS/part_export/thirdlane.pm index f2846fc7f..0537e784c 100644 --- a/FS/FS/part_export/thirdlane.pm +++ b/FS/FS/part_export/thirdlane.pm @@ -13,7 +13,10 @@ tie my %options, 'Tie::IxHash', #'server' => { label => 'Thirdlane server name or IP address', }, 'username' => { label => 'Thirdlane username', }, 'password' => { label => 'Thirdlane password', }, - 'port' => { label => 'Port number if not 80', }, + 'ssl' => { label => 'Enable HTTPS (SSL) connection', + type => 'checkbox', + }, + 'port' => { label => 'Port number if not 80 or 443', }, 'prototype_tenant' => { label => 'Prototype tenant name', }, 'debug' => { label => 'Checkbox label', type => 'checkbox' }, # 'select_option' => { label => 'Select option description', @@ -253,10 +256,11 @@ sub _export_delete { sub _thirdlane_command { my($self, @param) = @_; - my $url = 'http://'. uri_escape($self->option('username')). ':'. - uri_escape($self->option('password')). '@'. - $self->machine; - $url.= ':'. $self->option('port') if $self->option('port'); + my $url = $self->option('ssl') ? 'https://' : 'http://'; + $url .= uri_escape($self->option('username')). ':'. + uri_escape($self->option('password')). '@'. + $self->machine; + $url .= ':'. $self->option('port') if $self->option('port'); $url .= '/xmlrpc.cgi'; warn "$me connecting to $url\n"