This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / FS / FS / XMLRPC.pm
index 73ce13f..fb0e5ac 100644 (file)
@@ -1,7 +1,7 @@
- package FS::XMLRPC;
+package FS::XMLRPC;
 
 use strict;
-use vars qw( $DEBUG );
+use vars qw( @ISA $DEBUG );
 use Frontier::RPC2;
 
 # Instead of 'use'ing freeside modules on the fly below, just preload them now.
@@ -11,10 +11,10 @@ use FS::Conf;
 use FS::Record;
 use FS::cust_main;
 
-use FS::Maestro;
-
 use Data::Dumper;
 
+@ISA = qw( );
+
 $DEBUG = 0;
 
 =head1 NAME
@@ -131,9 +131,9 @@ sub _serve { #Subroutine, not method
 
     }
 
-    if ( scalar(@result) == 1 && ref($result[0]) eq 'HASH' ) {
-      return $result[0];
-    } elsif (grep { UNIVERSAL::can($_, 'hashref') ? 0 : 1 } @result) {
+    warn Dumper(@result) if $DEBUG;
+
+    if (grep { UNIVERSAL::can($_, 'hashref') ? 0 : 1 } @result) {
       #warn "FS::XMLRPC: One or more objects returned from '${fssub}' doesn't " .
       #     "support the 'hashref' method.";
       
@@ -147,8 +147,8 @@ sub _serve { #Subroutine, not method
     return [ $FS::VERSION ];
   } # else...
 
-  warn "Unhandled XMLRPC request '${method_name}'";
-  return {};
+  warn "Unhandle XMLRPC request '${method_name}'";
+  return [];
 
 }