summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/CGI.pm15
-rw-r--r--Bugzilla/Config/Common.pm2
-rw-r--r--Bugzilla/Constants.pm8
3 files changed, 12 insertions, 13 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 1a1a1ac74..a00d632c3 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -21,26 +21,25 @@
# Byron Jones <bugzilla@glob.com.au>
# Marc Schumann <wurblzap@gmail.com>
+package Bugzilla::CGI;
use strict;
-package Bugzilla::CGI;
+use Bugzilla::Constants;
+use Bugzilla::Error;
+use Bugzilla::Util;
BEGIN {
- if ($^O =~ /MSWin32/i) {
+ if (ON_WINDOWS) {
# Help CGI find the correct temp directory as the default list
# isn't Windows friendly (Bug 248988)
$ENV{'TMPDIR'} = $ENV{'TEMP'} || $ENV{'TMP'} || "$ENV{'WINDIR'}\\TEMP";
}
}
-use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PUSH);
-
+use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles
+ :unique_headers SERVER_PUSH);
use base qw(CGI);
-use Bugzilla::Constants;
-use Bugzilla::Error;
-use Bugzilla::Util;
-
# We need to disable output buffering - see bug 179174
$| = 1;
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index cb95a2f8d..90a5a6c76 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -297,7 +297,7 @@ sub check_mail_delivery_method {
my $check = check_multi(@_);
return $check if $check;
my $mailer = shift;
- if ($mailer eq 'sendmail' && $^O =~ /MSWin32/i) {
+ if ($mailer eq 'sendmail' and ON_WINDOWS) {
# look for sendmail.exe
return "Failed to locate " . SENDMAIL_EXE
unless -e SENDMAIL_EXE;
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index ef3853788..5691df900 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -430,13 +430,13 @@ use constant DB_MODULE => {
name => 'Oracle'},
};
-# The user who should be considered "root" when we're giving
-# instructions to Bugzilla administrators.
-use constant ROOT_USER => $^O =~ /MSWin32/i ? 'Administrator' : 'root';
-
# True if we're on Win32.
use constant ON_WINDOWS => ($^O =~ /MSWin32/i);
+# The user who should be considered "root" when we're giving
+# instructions to Bugzilla administrators.
+use constant ROOT_USER => ON_WINDOWS ? 'Administrator' : 'root';
+
use constant MIN_SMALLINT => -32768;
use constant MAX_SMALLINT => 32767;