diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-07-04 18:25:01 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-07-04 18:25:01 +0200 |
| commit | f6e177a89832ba36409ac845eb72522e051bb0f3 (patch) | |
| tree | c1df7e101b30060c3cb406ef19c4c69c985a01a1 /www/setup.php | |
| parent | 00d96cfc38f3d1d1d317ee56b4fdab0e9341e792 (diff) | |
| download | phorkie-f6e177a89832ba36409ac845eb72522e051bb0f3.tar.gz phorkie-f6e177a89832ba36409ac845eb72522e051bb0f3.zip | |
config file setup instructions
Diffstat (limited to 'www/setup.php')
| -rw-r--r-- | www/setup.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/www/setup.php b/www/setup.php index cd0deaa..f0be905 100644 --- a/www/setup.php +++ b/www/setup.php @@ -74,6 +74,7 @@ $out = <<<HTM <div class="page-header"> <h1>phorkie setup check</h1> </div> + <h3>Check results</h3> <ul class="list-group"> HTM; @@ -91,6 +92,36 @@ foreach ($messages as $arMessage) { } $out .= <<<HTM </ul> +HTM; + +if (array_sum($GLOBALS['phorkie']['cfgfiles']) == 0) { + //no config file loaded + reset($GLOBALS['phorkie']['cfgfiles']); + list($cfgFilePath, ) = each($GLOBALS['phorkie']['cfgfiles']); + + $cfgFilePath = Tools::foldPath($cfgFilePath); + $cfgFileTemplate = htmlspecialchars( + file_get_contents(__DIR__ . '/../data/config.php.dist') + ); + + $out .= <<<HTM + <h3 id="configfile">Configuration file</h3> + <p> + Phorkie did not find a configuration file. + Please create one at + </p> + <pre>$cfgFilePath</pre> + <p> + from the following template: + </p> + <pre>$cfgFileTemplate</pre> + <p> + Remove the leading <tt>//</tt> from a line if you want to adjust it. + </p> +HTM; +} + +$out .= <<<HTM <p> <a href="./">back</a> to the index </p> |
