diff options
author | mozilla%colinogilvie.co.uk <> | 2008-05-19 23:38:23 +0000 |
---|---|---|
committer | mozilla%colinogilvie.co.uk <> | 2008-05-19 23:38:23 +0000 |
commit | fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403 (patch) | |
tree | f67aae4192aaa70bad3e0820aace08b79c11b752 /Bugzilla/WebService | |
parent | 6d44fe8ec23aa8136347f6510606ac2a1eb12d6f (diff) | |
download | bugs-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar bugs-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar.gz bugs-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar.bz2 bugs-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar.xz bugs-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.zip |
Bug 415278: Make the WebService's plugin discovery method more extendable
Patch by: Colin Ogilvie <colin.ogilvie@gmail.com>; r=mkanat; a=LpSolit
Diffstat (limited to 'Bugzilla/WebService')
-rwxr-xr-x | Bugzilla/WebService/Bugzilla.pm | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Bugzilla/WebService/Bugzilla.pm b/Bugzilla/WebService/Bugzilla.pm index dde9cfd4b..7b58af254 100755 --- a/Bugzilla/WebService/Bugzilla.pm +++ b/Bugzilla/WebService/Bugzilla.pm @@ -36,12 +36,16 @@ 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}); +sub extensions { + 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}); + } } - return { plugins => $plugins }; + return { extensions => $extensions }; } sub timezone { @@ -89,22 +93,23 @@ string. =back -=item C<plugins> B<EXPERIMENTAL> +=item C<extensions> B<EXPERIMENTAL> =over =item B<Description> -Gets information about the plugins that are currently installed and enabled +Gets information about the extensions 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. +A hash with a single item, C<extesions>. This points to a hash. I<That> hash +contains the names of extensions as keys, and information about the extension +as values. One of the values that must be returned is the 'version' of the +extension =back |