summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Bugzilla.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-11-01 08:26:28 +0100
committermkanat%bugzilla.org <>2006-11-01 08:26:28 +0100
commite698452f3a2e5a04e291b880c2d823b098c0714a (patch)
treeaa41e2f77f03b026e8a5c2c6ef1fd791c7a5f448 /Bugzilla/WebService/Bugzilla.pm
parentd8370a5af3b242cedee3db8566dbfa13d7ca59d7 (diff)
downloadbugzilla-e698452f3a2e5a04e291b880c2d823b098c0714a.tar.gz
bugzilla-e698452f3a2e5a04e291b880c2d823b098c0714a.tar.xz
Bug 358703: WebService functions version and timezone should follow bugzilla standard
Patch By Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat, a=myk
Diffstat (limited to 'Bugzilla/WebService/Bugzilla.pm')
-rwxr-xr-xBugzilla/WebService/Bugzilla.pm51
1 files changed, 38 insertions, 13 deletions
diff --git a/Bugzilla/WebService/Bugzilla.pm b/Bugzilla/WebService/Bugzilla.pm
index 698dabbe8..1eeeebddc 100755
--- a/Bugzilla/WebService/Bugzilla.pm
+++ b/Bugzilla/WebService/Bugzilla.pm
@@ -14,24 +14,26 @@
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
+# Mads Bondo Dydensborg <mbd@dbc.dk>
package Bugzilla::WebService::Bugzilla;
use strict;
use base qw(Bugzilla::WebService);
use Bugzilla::Constants;
+import SOAP::Data qw(type);
use Time::Zone;
sub version {
- return BUGZILLA_VERSION;
+ return { version => type('string')->value(BUGZILLA_VERSION) };
}
sub timezone {
my $offset = tz_offset();
$offset = (($offset / 60) / 60) * 100;
$offset = sprintf('%+05d', $offset);
- return $offset;
+ return { timezone => type('string')->value($offset) };
}
1;
@@ -42,11 +44,6 @@ __END__
Bugzilla::WebService::Bugzilla - Global functions for the webservice interface.
-=head1 SYNOPSIS
-
- my $version = Bugzilla.version;
- my $tz = Bugzilla.timezone;
-
=head1 DESCRIPTION
This provides functions that tell you about Bugzilla in general.
@@ -58,14 +55,42 @@ and B<EXPERIMENTAL> mean.
=over
-=item C<version>
+=item C<version> B<EXPERIMENTAL>
+
+=over
+
+=item B<Description>
-Returns the current version of Bugzilla, as a string.
+Returns the current version of Bugzilla.
-=item C<timezone>
+=item B<Params> (none)
+
+=item B<Returns>
+
+A hash with a single item, C<version>, that is the version as a
+string.
+
+=item B<Errors> (none)
+
+=back
-Returns the timezone of the server Bugzilla is running on, in (+/-)XXXX
-(RFC 2822) format. This is important because all dates/times that the
-webservice interface returns will be in this timezone.
+=item C<timezone> B<EXPERIMENTAL>
+
+=over
+
+=item B<Description>
+
+Returns the timezone of the server Bugzilla is running on. This is
+important because all dates/times that the webservice interface
+returns will be in this timezone.
+
+=item B<Params> (none)
+
+=item B<Returns>
+
+A hash with a single item, C<timezone>, that is the timezone as a
+string in (+/-)XXXX (RFC 2822) format.
+
+=back
=back