Update of /cvsroot/openfirst/base/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6993/config
Modified Files:
first.php
Log Message:
More reliable OS detection method using PHP_OS
Index: first.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/first.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** first.php 14 Mar 2005 00:50:00 -0000 1.52
--- first.php 14 May 2005 20:34:33 -0000 1.53
***************
*** 149,170 ****
chdir('..');
$fbasepath = str_replace("\\", '/', getcwd());
- $windows = (isset($_ENV['OS']) && strpos(' ' . $_ENV['OS'], 'Windows')) ? true : false;
-
- if (!$windows) {
- $windows = (strstr(getcwd(), "\\")) ? true : false; // Contains backslash
- }
- if (!$windows && isset($_SERVER['SERVER_SIGNATURE'])) {
- $windows = (strstr($_SERVER['SERVER_SIGNATURE'], '(win32)')) ? true : false; // contains (win32)
- }
- if (!$windows && isset($_SERVER['PATH'])) {
- $windows = (strstr($_SERVER['PATH'], "\\")) ? true : false; // Contains backslash
- }
- if (!$windows && isset($_SERVER['SystemRoot'])) {
- $windows = (strstr($_SERVER['SystemRoot'], "\\")) ? true : false; // Contains backslash
- }
- if (!$windows && isset($_SERVER['SystemRoot'])) {
- $windows = (substr($_SERVER['SystemRoot'], 1, 1) == ':') ? true : false; // begins with a windows drive
- }
$sqlhost = 'localhost';
if(ini_get('mysql.default_host') != '') {
--- 149,159 ----
chdir('..');
$fbasepath = str_replace("\\", '/', getcwd());
+ if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
+ $windows = true;
+ } else {
+ $windows = false;
+ }
+
$sqlhost = 'localhost';
if(ini_get('mysql.default_host') != '') {
|