]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 394952: Allow extensions (aka plugins) to have a lib/ directory
authormkanat%bugzilla.org <>
Sat, 15 Sep 2007 04:28:47 +0000 (04:28 +0000)
committermkanat%bugzilla.org <>
Sat, 15 Sep 2007 04:28:47 +0000 (04:28 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat

Bugzilla/Hook.pm

index a02d0d6714c35ce0c97b6c3214677181a5478eb1..6b710f8b5c0caa0385b938c81bdf71d479628ccd 100644 (file)
@@ -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 $@;