projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merging RT 4.0.6
[freeside.git]
/
FS
/
FS
/
XMLRPC.pm
diff --git
a/FS/FS/XMLRPC.pm
b/FS/FS/XMLRPC.pm
index
84f3e41
..
73ce13f
100644
(file)
--- a/
FS/FS/XMLRPC.pm
+++ b/
FS/FS/XMLRPC.pm
@@
-1,7
+1,7
@@
-package FS::XMLRPC;
+
package FS::XMLRPC;
use strict;
use strict;
-use vars qw(
@ISA
$DEBUG );
+use vars qw( $DEBUG );
use Frontier::RPC2;
# Instead of 'use'ing freeside modules on the fly below, just preload them now.
use Frontier::RPC2;
# Instead of 'use'ing freeside modules on the fly below, just preload them now.
@@
-11,9
+11,11
@@
use FS::Conf;
use FS::Record;
use FS::cust_main;
use FS::Record;
use FS::cust_main;
-
@ISA = qw( )
;
+
use FS::Maestro
;
-$DEBUG = 1;
+use Data::Dumper;
+
+$DEBUG = 0;
=head1 NAME
=head1 NAME
@@
-84,7
+86,6
@@
sub _serve { #Subroutine, not method
my ($method_name, $params) = (shift, shift);
my ($method_name, $params) = (shift, shift);
- use Data::Dumper;
#die 'Called _serve without parameters' unless ref($params) eq 'ARRAY';
$params = [] unless (ref($params) eq 'ARRAY');
#die 'Called _serve without parameters' unless ref($params) eq 'ARRAY';
$params = [] unless (ref($params) eq 'ARRAY');
@@
-130,9
+131,9
@@
sub _serve { #Subroutine, not method
}
}
- warn Dumper(@result);
-
- if (grep { UNIVERSAL::can($_, 'hashref') ? 0 : 1 } @result) {
+ if ( scalar(@result) == 1 && ref($result[0]) eq 'HASH' ) {
+ return $result[0];
+
} els
if (grep { UNIVERSAL::can($_, 'hashref') ? 0 : 1 } @result) {
#warn "FS::XMLRPC: One or more objects returned from '${fssub}' doesn't " .
# "support the 'hashref' method.";
#warn "FS::XMLRPC: One or more objects returned from '${fssub}' doesn't " .
# "support the 'hashref' method.";
@@
-146,8
+147,8
@@
sub _serve { #Subroutine, not method
return [ $FS::VERSION ];
} # else...
return [ $FS::VERSION ];
} # else...
- warn "Unhandle XMLRPC request '${method_name}'";
- return
[]
;
+ warn "Unhandle
d
XMLRPC request '${method_name}'";
+ return
{}
;
}
}