summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-12-23 20:46:43 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-12-23 20:46:43 +0100
commit8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0 (patch)
tree74808e169701195ce18498f4de6dcf35778464a6 /Bugzilla/Config.pm
parentc94abb0445d015c1bffcd7207eac6fd9a3a8371b (diff)
downloadbugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.gz
bugzilla-8bbc156ca9a4bf3bfff8a9b7014a002808b1b7f0.tar.xz
Bug 1201113: Support to run Bugzilla as a PSGI application
r=dylan
Diffstat (limited to 'Bugzilla/Config.pm')
-rw-r--r--Bugzilla/Config.pm21
1 files changed, 12 insertions, 9 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 5dfe2e37d..d47577212 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -16,6 +16,7 @@ use autodie qw(:default);
use Bugzilla::Constants;
use Bugzilla::Hook;
+use Bugzilla::Install::Util qw(i_am_persistent);
use Bugzilla::Util qw(trick_taint);
use JSON::XS;
@@ -319,15 +320,17 @@ sub read_param_file {
}
}
elsif ($ENV{'SERVER_SOFTWARE'}) {
- # We're in a CGI, but the params file doesn't exist. We can't
- # Template Toolkit, or even install_string, since checksetup
- # might not have thrown an error. Bugzilla::CGI->new
- # hasn't even been called yet, so we manually use CGI::Carp here
- # so that the user sees the error.
- require CGI::Carp;
- CGI::Carp->import('fatalsToBrowser');
- die "The $file file does not exist."
- . ' You probably need to run checksetup.pl.',
+ # We're in a CGI, but the params file doesn't exist. We can't
+ # Template Toolkit, or even install_string, since checksetup
+ # might not have thrown an error. Bugzilla::CGI->new
+ # hasn't even been called yet, so we manually use CGI::Carp here
+ # so that the user sees the error.
+ unless (i_am_persistent()) {
+ require CGI::Carp;
+ CGI::Carp->import('fatalsToBrowser');
+ }
+ die "The $file file does not exist."
+ . ' You probably need to run checksetup.pl.',
}
return \%params;
}