aboutsummaryrefslogtreecommitdiff
path: root/install/ElggRewriteTester.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/ElggRewriteTester.php')
-rw-r--r--install/ElggRewriteTester.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/install/ElggRewriteTester.php b/install/ElggRewriteTester.php
index c8a503cb8..c01510f60 100644
--- a/install/ElggRewriteTester.php
+++ b/install/ElggRewriteTester.php
@@ -30,7 +30,7 @@ class ElggRewriteTester {
*/
public function run($url, $path) {
- $this->guessWebServer();
+ $this->webserver = ElggRewriteTester::guessWebServer();
$this->rewriteTestPassed = $this->runRewriteTest($url);
@@ -48,17 +48,17 @@ class ElggRewriteTester {
/**
* Guess the web server from $_SERVER['SERVER_SOFTWARE']
*
- * @return void
+ * @return string
*/
- protected function guessWebServer() {
+ public static function guessWebServer() {
$serverString = strtolower($_SERVER['SERVER_SOFTWARE']);
$possibleServers = array('apache', 'nginx', 'lighttpd', 'iis');
foreach ($possibleServers as $server) {
if (strpos($serverString, $server) !== FALSE) {
- $this->webserver = $server;
- return;
+ return $server;
}
}
+ return 'unknown';
}
/**