From dc4fc18fa7c860932fc8a30b52c828028369562e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 19 Oct 2007 13:07:28 +0000 Subject: Bug 396245: Allow the WebService to list the installed plugins and their versions Patch By Max Kanat-Alexander r=ghendricks, a=mkanat --- Bugzilla/WebService/Bugzilla.pm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Bugzilla/WebService/Bugzilla.pm') diff --git a/Bugzilla/WebService/Bugzilla.pm b/Bugzilla/WebService/Bugzilla.pm index 1eeeebddc..c6b0218cf 100755 --- a/Bugzilla/WebService/Bugzilla.pm +++ b/Bugzilla/WebService/Bugzilla.pm @@ -21,6 +21,7 @@ package Bugzilla::WebService::Bugzilla; use strict; use base qw(Bugzilla::WebService); use Bugzilla::Constants; +use Bugzilla::Hook; import SOAP::Data qw(type); use Time::Zone; @@ -29,6 +30,14 @@ sub version { return { version => type('string')->value(BUGZILLA_VERSION) }; } +sub plugins { + my $plugins = Bugzilla::Hook::enabled_plugins(); + foreach my $name (keys %$plugins) { + $plugins->{$name} = type('string')->value($plugins->{$name}); + } + return { plugins => $plugins }; +} + sub timezone { my $offset = tz_offset(); $offset = (($offset / 60) / 60) * 100; @@ -74,6 +83,25 @@ string. =back +=item C B + +=over + +=item B + +Gets information about the plugins that are currently installed and enabled +in this Bugzilla. + +=item B (none) + +=item B + +A hash with a single item, C. This points to a hash. I hash +contains the names of plugins as keys, and the versions of the plugin as +values. + +=back + =item C B =over -- cgit v1.2.3-24-g4f1b