mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
MINOR Removed double up of similar logic in InstallRequirements
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@108569 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
48a301266a
commit
e03e0c1d60
13
install.php
13
install.php
@ -294,17 +294,15 @@ class InstallRequirements {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the webserver software running on the PHP host.
|
* Find the webserver software running on the PHP host.
|
||||||
* @return string Server software ("Unknown" if not able to find)
|
* @return string|boolean Server software or boolean FALSE
|
||||||
*/
|
*/
|
||||||
function findWebserver() {
|
function findWebserver() {
|
||||||
// Try finding from SERVER_SIGNATURE or SERVER_SOFTWARE
|
// Try finding from SERVER_SIGNATURE or SERVER_SOFTWARE
|
||||||
$webserver = @$_SERVER['SERVER_SIGNATURE'];
|
$webserver = @$_SERVER['SERVER_SIGNATURE'];
|
||||||
if(!$webserver) $webserver = @$_SERVER['SERVER_SOFTWARE'];
|
if(!$webserver) $webserver = @$_SERVER['SERVER_SOFTWARE'];
|
||||||
|
|
||||||
// If we still can't find it, this is a completely unknown server
|
if($webserver) return strip_tags(trim($webserver));
|
||||||
if(!$webserver) $webserver = 'Unknown';
|
else return false;
|
||||||
|
|
||||||
return strip_tags(trim($webserver));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -782,9 +780,7 @@ class InstallRequirements {
|
|||||||
|
|
||||||
function isRunningWebServer($testDetails) {
|
function isRunningWebServer($testDetails) {
|
||||||
$this->testing($testDetails);
|
$this->testing($testDetails);
|
||||||
if(function_exists('apache_get_modules') || stristr(@$_SERVER['SERVER_SIGNATURE'], 'Apache')) {
|
if($testDetails[3]) {
|
||||||
return true;
|
|
||||||
} elseif(strpos($_SERVER['SERVER_SOFTWARE'], 'IIS/7') !== false) {
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$this->warning($testDetails);
|
$this->warning($testDetails);
|
||||||
@ -792,7 +788,6 @@ class InstallRequirements {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Must be PHP4 compatible
|
// Must be PHP4 compatible
|
||||||
var $baseDir;
|
var $baseDir;
|
||||||
function getBaseDir() {
|
function getBaseDir() {
|
||||||
|
Loading…
Reference in New Issue
Block a user