Permalink
Browse files

MINOR Removed double up of similar logic in InstallRequirements (from…

… r108569)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112410 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent f9d29bd commit 83567dccdd17eaf9f0f76ee17c06820086b9e9a5 sminnee committed Oct 15, 2010
Showing with 5 additions and 10 deletions.
  1. +5 −10 install.php
View
@@ -305,17 +305,15 @@ function isApache() {
/**
* 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() {
// Try finding from SERVER_SIGNATURE or SERVER_SOFTWARE
$webserver = @$_SERVER['SERVER_SIGNATURE'];
if(!$webserver) $webserver = @$_SERVER['SERVER_SOFTWARE'];
- // If we still can't find it, this is a completely unknown server
- if(!$webserver) $webserver = 'Unknown';
-
- return strip_tags(trim($webserver));
+ if($webserver) return strip_tags(trim($webserver));
+ else return false;
}
/**
@@ -793,20 +791,17 @@ function requireServerVariables($varNames, $errorMessage) {
$this->error($testDetails);
}
}
-
+
function isRunningWebServer($testDetails) {
$this->testing($testDetails);
- if(function_exists('apache_get_modules') || stristr(@$_SERVER['SERVER_SIGNATURE'], 'Apache')) {
- return true;
- } elseif(strpos($_SERVER['SERVER_SOFTWARE'], 'IIS/7') !== false) {
+ if($testDetails[3]) {
return true;
} else {
$this->warning($testDetails);
return false;
}
}
-
// Must be PHP4 compatible
var $baseDir;
function getBaseDir() {

0 comments on commit 83567dc

Please sign in to comment.