BUGFIX Fixed InstallerRequirements::isApache() which didn't work if $_SERVER['SERVER_SIGNATURE'] is available for Apache (from r101733)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112224 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2010-10-13 04:28:14 +00:00
parent b7de7c502c
commit 66b1ce5e12

View File

@ -277,15 +277,16 @@ class InstallRequirements {
} }
function isApache() { function isApache() {
$webserver = strip_tags(trim(@$_SERVER['SERVER_SIGNATURE'])); $signature = isset($_SERVER['SERVER_SIGNATURE'])
if(!$webserver) { ? $_SERVER['SERVER_SIGNATURE']
if(isset($_SERVER['SERVER_SOFTWARE'])) { : @$_SERVER['SERVER_SOFTWARE'];
if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
return true; $signature = strip_tags(trim($signature));
} if($signature && strpos($signature, 'Apache') !== false) {
} return true;
} else {
return false;
} }
return false;
} }
function findWebserver() { function findWebserver() {