Fix installer isIIS() to include IIS versions greater than 7.

This commit is contained in:
websTTer 2013-11-16 14:49:31 +01:00 committed by Sean Harvey
parent bd5fdf1f19
commit cd3cc1b923

View File

@ -362,15 +362,14 @@ class InstallRequirements {
} }
/** /**
* Check if the web server is IIS. * Check if the web server is IIS and version greater than the given version.
* @return boolean * @return boolean
*/ */
function isIIS($version = 7) { function isIIS($fromVersion = 7) {
if(strpos($this->findWebserver(), 'IIS/' . $version) !== false) { if(strpos($this->findWebserver(), 'IIS/') === false) {
return true;
} else {
return false; return false;
} }
return substr(strstr($this->findWebserver(), '/'), -3, 1) >= $fromVersion;
} }
function isApache() { function isApache() {
@ -400,7 +399,7 @@ class InstallRequirements {
function check() { function check() {
$this->errors = null; $this->errors = null;
$isApache = $this->isApache(); $isApache = $this->isApache();
$isIIS = $this->isIIS(7); $isIIS = $this->isIIS();
$webserver = $this->findWebserver(); $webserver = $this->findWebserver();
$this->requirePHPVersion('5.3.4', '5.3.2', array( $this->requirePHPVersion('5.3.4', '5.3.2', array(