From 6cf3c88ecb5077a9c6f3941fbae139f3e6937430 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 1 Jul 2008 13:19:20 +0000 Subject: Bug 437617: Make "type" a method of Bugzilla::WebService Patch By Max Kanat-Alexander r=dkl, a=mkanat --- Bugzilla/WebService.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla/WebService.pm') diff --git a/Bugzilla/WebService.pm b/Bugzilla/WebService.pm index 94dbb6217..7812a237b 100755 --- a/Bugzilla/WebService.pm +++ b/Bugzilla/WebService.pm @@ -20,6 +20,7 @@ package Bugzilla::WebService; use strict; use Bugzilla::WebService::Constants; use Date::Parse; +use XMLRPC::Lite; sub fail_unimplemented { my $this = shift; @@ -62,6 +63,14 @@ sub login_exempt { return $class->LOGIN_EXEMPT->{$method}; } +sub type { + my ($self, $type, $value) = @_; + if ($type eq 'dateTime') { + $value = $self->datetime_format($value); + } + return XMLRPC::Data->type($type)->value($value); +} + 1; package Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI; -- cgit v1.2.3-24-g4f1b