fix elasticsearch setup check that was broken by jnovack
authorChristian Weiske <cweiske@cweiske.de>
Thu, 27 Sep 2012 17:36:15 +0000 (19:36 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 27 Sep 2012 17:36:15 +0000 (19:36 +0200)
src/phorkie/SetupCheck.php

index f1fbc0f..95fd759 100644 (file)
@@ -32,9 +32,7 @@ class SetupCheck
         $sc->checkDeps();
         $sc->checkDirs();
         $sc->checkGit();
-        if ($this->elasticsearch != '') {
-            $sc->checkDatabase();
-        }
+        $sc->checkDatabase();
     }
 
     public function checkDeps()
@@ -76,6 +74,10 @@ class SetupCheck
 
     public function checkDatabase()
     {
+        if ($this->elasticsearch != '') {
+            return;
+        }
+
         $es = parse_url($this->elasticsearch);
         if (!preg_match("#/.+/#", $es['path'], $matches)) {
             $this->fail('Improper elasticsearch url.  Elasticsearch requires a'