summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Bugzilla.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/Bugzilla.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/Bugzilla.pm')
-rwxr-xr-xBugzilla/WebService/Bugzilla.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/Bugzilla/WebService/Bugzilla.pm b/Bugzilla/WebService/Bugzilla.pm
index 7b58af254..af64f4e3a 100755
--- a/Bugzilla/WebService/Bugzilla.pm
+++ b/Bugzilla/WebService/Bugzilla.pm
@@ -22,7 +22,6 @@ use strict;
use base qw(Bugzilla::WebService);
use Bugzilla::Constants;
use Bugzilla::Hook;
-import SOAP::Data qw(type);
use Time::Zone;
@@ -33,26 +32,29 @@ use constant LOGIN_EXEMPT => {
};
sub version {
- return { version => type('string')->value(BUGZILLA_VERSION) };
+ my $self = shift;
+ return { version => $self->type('string', BUGZILLA_VERSION) };
}
sub extensions {
+ my $self = shift;
my $extensions = Bugzilla::Hook::enabled_plugins();
foreach my $name (keys %$extensions) {
my $info = $extensions->{$name};
- foreach my $data (keys %$info)
- {
- $extensions->{$name}->{$data} = type('string')->value($info->{$data});
+ foreach my $data (keys %$info) {
+ $extensions->{$name}->{$data} =
+ $self->type('string', $info->{$data});
}
}
return { extensions => $extensions };
}
sub timezone {
+ my $self = shift;
my $offset = tz_offset();
$offset = (($offset / 60) / 60) * 100;
$offset = sprintf('%+05d', $offset);
- return { timezone => type('string')->value($offset) };
+ return { timezone => $self->type('string', $offset) };
}
1;