diff options
author | mkanat%bugzilla.org <> | 2009-11-18 07:01:40 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-18 07:01:40 +0000 |
commit | bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d (patch) | |
tree | 4a6b0e7a7800545f9083fe70fed45e3c9c0d1edf /mod_perl.pl | |
parent | Bug 529483: Release Notes for Bugzilla 3.4.4 (diff) | |
download | bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.tar.gz bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.tar.bz2 bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.zip |
Fix for Bug 527505: Make t/001compile.t work even after Bugzilla::Install::CPAN messes with @INC, and make Bugzilla->feature work during mod_perl.pl.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'mod_perl.pl')
-rwxr-xr-x[-rw-r--r--] | mod_perl.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mod_perl.pl b/mod_perl.pl index 1e5c7fc63..8ca691f9c 100644..100755 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -34,12 +34,14 @@ use ModPerl::RegistryLoader (); use CGI (); CGI->compile(qw(:cgi -no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PUSH :push)); +use File::Basename (); use Template::Config (); Template::Config->preload(); use Bugzilla (); use Bugzilla::Constants (); use Bugzilla::CGI (); +use Bugzilla::Install::Requirements (); use Bugzilla::Mailer (); use Bugzilla::Template (); use Bugzilla::Util (); @@ -75,9 +77,12 @@ my $rl = new ModPerl::RegistryLoader(); # If we try to do this in "new" it fails because it looks for a # Bugzilla/ModPerl/ResponseHandler.pm $rl->{package} = 'Bugzilla::ModPerl::ResponseHandler'; -# Note that $cgi_path will be wrong if somebody puts the libraries -# in a different place than the CGIs. +my $feature_files = Bugzilla::Install::Requirements::map_files_to_features(); foreach my $file (glob "$cgi_path/*.cgi") { + my $base_filename = File::Basename::basename($file); + if (my $feature = $feature_files->{$base_filename}) { + next if !Bugzilla->feature($feature); + } Bugzilla::Util::trick_taint($file); $rl->handler($file, $file); } |