summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Util.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/Install/Util.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/Install/Util.pm')
-rw-r--r--Bugzilla/Install/Util.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index c05037061..82752b961 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -34,6 +34,7 @@ our @EXPORT_OK = qw(
extension_requirement_packages
extension_template_directory
extension_web_directory
+ i_am_persistent
indicate_progress
install_string
include_languages
@@ -83,6 +84,10 @@ sub get_version_and_os {
os_ver => $os_details[3] };
}
+sub i_am_persistent {
+ return ($ENV{MOD_PERL} || $ENV{BZ_PLACK}) ? 1 : 0;
+}
+
sub _extension_paths {
my $dir = bz_locations()->{'extensionsdir'};
my @extension_items = glob("$dir/*");
@@ -711,6 +716,11 @@ binary, if the binary is in the C<PATH>.
Returns a hash containing information about what version of Bugzilla we're
running, what perl version we're using, and what OS we're running on.
+=item C<i_am_persistent>
+
+Returns true if Bugzilla is running in a persistent environment, such as
+mod_perl or PSGI. Returns false if running in mod_cgi mode.
+
=item C<get_console_locale>
Returns the language to use based on the LC_CTYPE value returned by the OS.