From 82a6ee698f52595ce7ec43fabefd222a1f80892a Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 14 Feb 2012 23:02:15 +0100 Subject: Bug 727240: The POD for Bug.attachments is wrong about the format of the returned data r=dkl a=LpSolit --- Bugzilla/WebService/Bug.pm | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index ea1becc0a..a8c7282ef 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -1274,19 +1274,14 @@ value looks like this: { bugs => { - 1345 => { - attachments => [ - { (attachment) }, - { (attachment) } - ] - }, - 9874 => { - attachments => [ - { (attachment) }, - { (attachment) } - ] - - }, + 1345 => [ + { (attachment) }, + { (attachment) } + ], + 9874 => [ + { (attachment) }, + { (attachment) } + ], }, attachments => { @@ -1297,9 +1292,8 @@ value looks like this: The attachments of any bugs that you specified in the C argument in input are returned in C on output. C is a hash that has integer -bug IDs for keys and contains a single key, C. That key points -to an arrayref that contains attachments as a hash. (Fields for attachments -are described below.) +bug IDs for keys and the values are arrayrefs that contain hashes as attachments. +(Fields for attachments are described below.) For any attachments that you specified directly in C, they are returned in C on output. This is a hash where the attachment -- cgit v1.2.3-24-g4f1b From 3d4edc9bd64bf54e5c8de528904a428d30503f3a Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Wed, 15 Feb 2012 10:59:08 -0500 Subject: Bug 724464 - JSON-RPC support shouldn't require SOAP::Lite r/a=LpSolit --- Bugzilla/WebService/Server/XMLRPC.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm index b74d0eebd..5c3677993 100644 --- a/Bugzilla/WebService/Server/XMLRPC.pm +++ b/Bugzilla/WebService/Server/XMLRPC.pm @@ -31,6 +31,20 @@ if ($ENV{MOD_PERL}) { use Bugzilla::WebService::Constants; +# Allow WebService methods to call XMLRPC::Lite's type method directly +BEGIN { + *Bugzilla::WebService::type = sub { + my ($self, $type, $value) = @_; + if ($type eq 'dateTime') { + # This is the XML-RPC implementation, see the README in Bugzilla/WebService/. + # Our "base" implementation is in Bugzilla::WebService::Server. + $value = Bugzilla::WebService::Server->datetime_format_outbound($value); + $value =~ s/-//g; + } + return XMLRPC::Data->type($type)->value($value); + }; +} + sub initialize { my $self = shift; my %retval = $self->SUPER::initialize(@_); -- cgit v1.2.3-24-g4f1b