[freeside-commits] branch FREESIDE_3_BRANCH updated. f763bd22bb0be7edeec3a8a9ca19fa3e88cd51cb

Ivan ivan at 420.am
Sat Apr 2 15:34:46 PDT 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  f763bd22bb0be7edeec3a8a9ca19fa3e88cd51cb (commit)
      from  f8b487ec9788999ed16e77ff246fa4f34f8d7af1 (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 f763bd22bb0be7edeec3a8a9ca19fa3e88cd51cb
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Apr 2 15:34:45 2016 -0700

    webservice infrastructure, RT#33849

diff --git a/FS/FS/ClientAPI/Freeside.pm b/FS/FS/ClientAPI/Freeside.pm
index dcd3ed6..8aa61e6 100644
--- a/FS/FS/ClientAPI/Freeside.pm
+++ b/FS/FS/ClientAPI/Freeside.pm
@@ -4,7 +4,7 @@ use strict;
 #use vars qw($DEBUG $me);
 use FS::Record qw(qsearchs);
 use FS::Conf;
-use FS::svc_external;
+use FS::svc_acct;
 use FS::webservice_log;
 
 #$DEBUG = 0;
@@ -30,7 +30,7 @@ sub freesideinc_service {
     or return { 'error' => 'bad support-key' };
   my($username, $_password) = ($1,$2);
 
-  my $svc_external = qsearchs({
+  my $svc_acct = qsearchs({
     'table'     => 'svc_acct',
     'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum )',
     'hashref'   => { 'username'  => $username,
@@ -38,7 +38,7 @@ sub freesideinc_service {
                    },
     'extra_sql' => "AND svcpart = $svcpart",
   });
-  unless ( $svc_external ) {
+  unless ( $svc_acct ) {
     warn "bad support-key for $username from $ENV{REMOTE_IP}\n";
     sleep 5; #ideally also rate-limit and eventually ban their IP
     return { 'error' => 'bad support-key' };
@@ -48,10 +48,10 @@ sub freesideinc_service {
   # but for now, everybody can use everything
 
   #record it happened
-  my $custnum = $svc_external->cust_svc->cust_pkg->custnum;
+  my $custnum = $svc_acct->cust_svc->cust_pkg->custnum;
   my $webservice_log = new FS::webservice_log {
     'custnum'  => $custnum,
-    'svcnum'   => $svc_external->svcnum,
+    'svcnum'   => $svc_acct->svcnum,
     'method'   => $packet->{'method'},
     'quantity' => $packet->{'quantity'} || 1,
   };

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

Summary of changes:
 FS/FS/ClientAPI/Freeside.pm |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list