summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-07-01 15:19:20 +0200
committermkanat%bugzilla.org <>2008-07-01 15:19:20 +0200
commit6cf3c88ecb5077a9c6f3941fbae139f3e6937430 (patch)
tree7b4aed4ab66c2fdfbce25c8b946c71d137133deb /Bugzilla/WebService.pm
parent7b6d4bdc2c4c9368479150bb333659b00cece1d5 (diff)
downloadbugzilla-6cf3c88ecb5077a9c6f3941fbae139f3e6937430.tar.gz
bugzilla-6cf3c88ecb5077a9c6f3941fbae139f3e6937430.tar.xz
Bug 437617: Make "type" a method of Bugzilla::WebService
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/WebService.pm')
-rwxr-xr-xBugzilla/WebService.pm9
1 files changed, 9 insertions, 0 deletions
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;