summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Bugzilla.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-19 15:07:28 +0200
committermkanat%bugzilla.org <>2007-10-19 15:07:28 +0200
commitdc4fc18fa7c860932fc8a30b52c828028369562e (patch)
tree4111a549cb69e4db8ebbed06342417256d75e3b9 /Bugzilla/WebService/Bugzilla.pm
parentf567c6d3e3d99e9ba5087a6abc663fe61e9d5985 (diff)
downloadbugzilla-dc4fc18fa7c860932fc8a30b52c828028369562e.tar.gz
bugzilla-dc4fc18fa7c860932fc8a30b52c828028369562e.tar.xz
Bug 396245: Allow the WebService to list the installed plugins and their versions
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'Bugzilla/WebService/Bugzilla.pm')
-rwxr-xr-xBugzilla/WebService/Bugzilla.pm28
1 files changed, 28 insertions, 0 deletions
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<plugins> B<EXPERIMENTAL>
+
+=over
+
+=item B<Description>
+
+Gets information about the plugins that are currently installed and enabled
+in this Bugzilla.
+
+=item B<Params> (none)
+
+=item B<Returns>
+
+A hash with a single item, C<plugins>. This points to a hash. I<That> hash
+contains the names of plugins as keys, and the versions of the plugin as
+values.
+
+=back
+
=item C<timezone> B<EXPERIMENTAL>
=over