move load method to top
[phorkie.git] / src / phorkie / SetupCheck.php
index 95fd75993d2c3b88076573e75059915da39cd2c3..0affe05caec281d960e4fa093a8ba23b4e592390 100644 (file)
@@ -8,6 +8,7 @@ class SetupCheck
         'pear.twig-project.org/Twig'       => 'Twig_Autoloader',
         'pear.php.net/Date_HumanDiff'      => 'Date_HumanDiff',
         'pear.php.net/HTTP_Request2'       => 'HTTP_Request2',
+        'pear.php.net/OpenID'              => 'OpenID',
         'pear.php.net/Pager'               => 'Pager',
         'pear.php.net/Services_Libravatar' => 'Services_Libravatar',
         'zustellzentrum.cweiske.de/MIME_Type_PlainDetect' => 'MIME_Type_PlainDetect',
@@ -42,6 +43,18 @@ class SetupCheck
                 $this->fail('PEAR package not installed: ' . $package);
             }
         }
+
+        $geshi = stream_resolve_include_path(
+            $GLOBALS['phorkie']['cfg']['geshi']
+        );
+        if ($geshi === false) {
+            $this->fail('GeSHi not available');
+        }
+
+        $markdown = stream_resolve_include_path('markdown.php');
+        if ($markdown === false) {
+            $this->fail('Markdown renderer not available');
+        }
     }
 
     public function checkDirs()
@@ -74,14 +87,17 @@ class SetupCheck
 
     public function checkDatabase()
     {
-        if ($this->elasticsearch != '') {
+        if ($this->elasticsearch == '') {
             return;
         }
 
         $es = parse_url($this->elasticsearch);
         if (!preg_match("#/.+/#", $es['path'], $matches)) {
-            $this->fail('Improper elasticsearch url.  Elasticsearch requires a'
-                       . ' search domain to store your data. (e.g. http://localhost:9200/phorkie/)');
+            $this->fail(
+                'Improper elasticsearch url.  Elasticsearch requires a'
+                . ' search domain to store your data.'
+                . ' (e.g. http://localhost:9200/phorkie/)'
+            );
         }
         $dbs = new Database();
         $dbs->getSetup()->setup();