projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b27ffc
)
fix UTF-8 in ClientAPI, RT#38254
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 5 Oct 2015 21:43:30 +0000
(14:43 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 5 Oct 2015 21:43:30 +0000
(14:43 -0700)
FS/FS/ClientAPI_XMLRPC.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI_XMLRPC.pm
b/FS/FS/ClientAPI_XMLRPC.pm
index
5934402
..
96b4b71
100644
(file)
--- a/
FS/FS/ClientAPI_XMLRPC.pm
+++ b/
FS/FS/ClientAPI_XMLRPC.pm
@@
-30,6
+30,7
@@
L<FS::SelfService::XMLRPC>, L<FS::SelfService>
use strict;
use vars qw($DEBUG $AUTOLOAD);
use strict;
use vars qw($DEBUG $AUTOLOAD);
+use Encode;
use XMLRPC::Lite; # for XMLRPC::Data
use FS::ClientAPI;
use XMLRPC::Lite; # for XMLRPC::Data
use FS::ClientAPI;
@@
-67,12
+68,17
@@
sub AUTOLOAD {
shift; #discard package name;
shift; #discard package name;
+
#$call = "FS::SelfService::$call";
#no strict 'refs';
#&{$call}(@_);
#FS::ClientAPI->dispatch($autoload->{$call}, @_);
#$call = "FS::SelfService::$call";
#no strict 'refs';
#&{$call}(@_);
#FS::ClientAPI->dispatch($autoload->{$call}, @_);
- my $return = FS::ClientAPI->dispatch($autoload->{$call}, { @_ } );
+ my %hash = @_;
+ #XXX doesn't handle multi-level data structs
+ $hash{$_} = decode(utf8=>$hash{$_}) foreach keys %hash;
+
+ my $return = FS::ClientAPI->dispatch($autoload->{$call}, \%hash );
if ( exists($typefix{$call}) ) {
my $typefix = $typefix{$call};
if ( exists($typefix{$call}) ) {
my $typefix = $typefix{$call};
@@
-85,7
+91,7
@@
sub AUTOLOAD {
$return;
$return;
- }
else
{
+ }
else
{
die "No such procedure: $call";
}
}
die "No such procedure: $call";
}
}