[freeside-commits] freeside/FS/FS/part_export thirdlane.pm, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Fri Jan 29 11:52:44 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv28165

Modified Files:
	thirdlane.pm 
Log Message:
ssl option

Index: thirdlane.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/thirdlane.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- thirdlane.pm	27 Jan 2010 05:27:04 -0000	1.6
+++ thirdlane.pm	29 Jan 2010 19:52:42 -0000	1.7
@@ -13,7 +13,10 @@
   #'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 _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"



More information about the freeside-commits mailing list