warn about remote fork config in setup and help
[phorkie.git] / src / phorkie / SetupCheck.php
index c459e2af546d251c981fc9f0888dc525e9f53072..69cffd8f073e7b200dfb861eeb1a92183f2858ce 100644 (file)
@@ -39,6 +39,7 @@ class SetupCheck
         $sc->checkGit();
         $sc->checkDatabase();
         $sc->checkMimeTypeDetection();
+        $sc->checkRemoteForking();
 
         return $sc->messages;
     }
@@ -133,6 +134,18 @@ class SetupCheck
         }
     }
 
+    public function checkRemoteForking()
+    {
+        if (!isset($GLOBALS['phorkie']['cfg']['git']['public'])
+            || $GLOBALS['phorkie']['cfg']['git']['public'] == ''
+        ) {
+            $this->fail(
+                'No public git URL prefix configured.'
+                . ' Remote forking will not work'
+            );
+        }
+    }
+
     public function fail($msg)
     {
         $this->messages[] = array('error', $msg);