diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-07-04 08:28:22 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-07-04 08:28:22 +0200 |
| commit | 43b23197ffc3e1d08a1e08b09dbb31f06692d7ff (patch) | |
| tree | 9451bb6d3e84ee486060bd9760e0602ae0409c99 | |
| parent | 7a46f728adc38e3507f83015354cfbdd2de7969e (diff) | |
| download | phorkie-43b23197ffc3e1d08a1e08b09dbb31f06692d7ff.tar.gz phorkie-43b23197ffc3e1d08a1e08b09dbb31f06692d7ff.zip | |
warn about remote fork config in setup and help
| -rw-r--r-- | data/templates/help.htm | 15 | ||||
| -rw-r--r-- | src/phorkie/SetupCheck.php | 13 | ||||
| -rw-r--r-- | www/help.php | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/data/templates/help.htm b/data/templates/help.htm index 555a738..a17aa50 100644 --- a/data/templates/help.htm +++ b/data/templates/help.htm @@ -46,4 +46,19 @@ function registerHandler() { </a> </div> </div> + +<h3 id="fork-check">Setup check</h3> +<p> + You need to activate public clone URLs in your config file. + Otherwise forking onto remote systems will not work. +</p> +{% if publicGitUrl %} +<div class="alert alert-success"> + OK! A public git URL prefix is configured: <tt>{{publicGitUrl}}</tt> +</div> +{% else %} +<div class="alert alert-error"> + Error! No public git URL prefix configured. +</div> +{% endif %} {% endblock %} diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php index c459e2a..69cffd8 100644 --- a/src/phorkie/SetupCheck.php +++ b/src/phorkie/SetupCheck.php @@ -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); diff --git a/www/help.php b/www/help.php index fe56c22..8ccdd69 100644 --- a/www/help.php +++ b/www/help.php @@ -10,6 +10,7 @@ render( 'help', array( 'htmlhelper' => new HtmlHelper(), + 'publicGitUrl' => @$GLOBALS['phorkie']['cfg']['git']['public'], ) ); ?> |
