diff options
author | mkanat%bugzilla.org <> | 2009-09-04 21:08:05 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-09-04 21:08:05 +0000 |
commit | ccaf82a249d988a9192034b5afa33b754aefd379 (patch) | |
tree | dba9420d26b014b5afe4e59f3a6010ca93b11152 /Bugzilla | |
parent | 120fc1b9be07ee44c98a9ec2c5c64568e9ebccbd (diff) | |
download | bugs-ccaf82a249d988a9192034b5afa33b754aefd379.tar bugs-ccaf82a249d988a9192034b5afa33b754aefd379.tar.gz bugs-ccaf82a249d988a9192034b5afa33b754aefd379.tar.bz2 bugs-ccaf82a249d988a9192034b5afa33b754aefd379.tar.xz bugs-ccaf82a249d988a9192034b5afa33b754aefd379.zip |
Bug 224588: Unify ($^O =~ /MSWin/) checks (always use ON_WINDOWS)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/CGI.pm | 15 | ||||
-rw-r--r-- | Bugzilla/Config/Common.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Constants.pm | 8 |
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; |