summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-17 00:48:51 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-17 00:48:51 +0100
commita636e89b6851367fa4e59e1bb646d1ad8d3456a6 (patch)
tree9b8f57862b0cadba10494a98036e902cd7d7c5f9 /Bugzilla/WebService
parent1dcfd9872fe4d43785e76030a89122424ffd4a7d (diff)
parent4622fc071220abaf0defbbde7be6c0c9ecba8aa8 (diff)
downloadbugzilla-a636e89b6851367fa4e59e1bb646d1ad8d3456a6.tar.gz
bugzilla-a636e89b6851367fa4e59e1bb646d1ad8d3456a6.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm26
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm14
2 files changed, 24 insertions, 16 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index c83ed5b5f..69dcb7d42 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -1337,19 +1337,14 @@ value looks like this:
{
bugs => {
- 1345 => {
- attachments => [
- { (attachment) },
- { (attachment) }
- ]
- },
- 9874 => {
- attachments => [
- { (attachment) },
- { (attachment) }
- ]
-
- },
+ 1345 => [
+ { (attachment) },
+ { (attachment) }
+ ],
+ 9874 => [
+ { (attachment) },
+ { (attachment) }
+ ],
},
attachments => {
@@ -1360,9 +1355,8 @@ value looks like this:
The attachments of any bugs that you specified in the C<ids> argument in
input are returned in C<bugs> on output. C<bugs> is a hash that has integer
-bug IDs for keys and contains a single key, C<attachments>. 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<attachment_ids>, they
are returned in C<attachments> on output. This is a hash where the attachment
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(@_);