diff options
author | mozilla%colinogilvie.co.uk <> | 2008-05-20 01:38:23 +0200 |
---|---|---|
committer | mozilla%colinogilvie.co.uk <> | 2008-05-20 01:38:23 +0200 |
commit | fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403 (patch) | |
tree | f67aae4192aaa70bad3e0820aace08b79c11b752 /Bugzilla/Hook.pm | |
parent | 6d44fe8ec23aa8136347f6510606ac2a1eb12d6f (diff) | |
download | bugzilla-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar.gz bugzilla-fbb30d2c53cbbd71c80d58b30d2ec77f3c14d403.tar.xz |
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/Hook.pm')
-rw-r--r-- | Bugzilla/Hook.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 7c47b3f3f..0cf566db1 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -69,7 +69,7 @@ sub enabled_plugins { next if -e "$extension/disabled"; # Allow extensions to load their own libraries. local @INC = ("$extension/lib", @INC); - $enabled{$extname} = do("$extension/version.pl"); + $enabled{$extname} = do("$extension/info.pl"); ThrowCodeError('extension_invalid', { errstr => $@, name => 'version', extension => $extension }) if $@; @@ -125,9 +125,12 @@ hook to do anything, you have to modify these variables. =head2 Versioning Extensions -Every extension must have a file in its root called F<version.pl>. -This file should return a version number when called with C<do>. -This represents the current version of this extension. +Every extension must have a file in its root called F<info.pl>. +This file must return a hash when called with C<do>. +The hash must contain a 'version' key with the current version of the +extension. Extension authors can also add any extra infomration to this hash if +required, by adding a new key beginning with x_ which will not be used the +core Bugzilla code. =head1 SUBROUTINES |