summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Hook.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-09-15 06:28:47 +0200
committermkanat%bugzilla.org <>2007-09-15 06:28:47 +0200
commit3317d729757a2d9776bdb4edff940b04df95545e (patch)
tree2af46c219639a472f7f5a8aa0d9a0596d8168e91 /Bugzilla/Hook.pm
parent2327a1538d5d8fbe9c8f7728f350e37d74e584c3 (diff)
downloadbugzilla-3317d729757a2d9776bdb4edff940b04df95545e.tar.gz
bugzilla-3317d729757a2d9776bdb4edff940b04df95545e.tar.xz
Bug 394952: Allow extensions (aka plugins) to have a lib/ directory
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index a02d0d671..6b710f8b5 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -44,6 +44,8 @@ sub process {
next if -e "$extension/disabled";
if (-e $extension.'/code/'.$name.'.pl') {
Bugzilla->hook_args($args);
+ # Allow extensions to load their own libraries.
+ local @INC = ("$extension/lib", @INC);
do($extension.'/code/'.$name.'.pl');
ThrowCodeError('extension_invalid',
{ errstr => $@, name => $name, extension => $extension }) if $@;