diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-03 20:58:23 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-03 20:58:23 +0000 |
| commit | 8e04c36d7d0d1212d5b53a78780088ff8be3bef7 (patch) | |
| tree | 08f8cdad11c1a56236973c6f4d523c219646b254 /roundcubemail/installer/test.php | |
| parent | 69e4a83f3c2fee1b6e9b7d3bc1031715c70bbf33 (diff) | |
Add methods to check and update local config files + show HTML output in installer test step
git-svn-id: https://svn.roundcube.net/trunk@1933 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/test.php')
| -rw-r--r-- | roundcubemail/installer/test.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/roundcubemail/installer/test.php b/roundcubemail/installer/test.php index ca7c7add4..8af6a6aef 100644 --- a/roundcubemail/installer/test.php +++ b/roundcubemail/installer/test.php @@ -27,6 +27,50 @@ else if (!$read_db) { $RCI->fail('db.inc.php', 'Unable to read file. Did you create the config files?'); } +if ($RCI->configured && ($messages = $RCI->check_config())) { + + if (is_array($messages['missing'])) { + echo '<h3 class="warning">Missing config options</h3>'; + echo '<p class="hint">The following config options are not present in the current configuration.<br/>'; + echo 'Please check the default config files and add the missing properties to your local config files.</p>'; + + echo '<ul class="configwarings">'; + foreach ($messages['missing'] as $msg) { + echo html::tag('li', null, html::span('propname', $msg['prop']) . ($msg['name'] ? ': ' . $msg['name'] : '')); + } + echo '</ul>'; + } + + if (is_array($messages['replaced'])) { + echo '<h3 class="warning">Replaced config options</h3>'; + echo '<p class="hint">The following config options have been replaced or renamed. '; + echo 'Please update them accordingly in your config files.</p>'; + + echo '<ul class="configwarings">'; + foreach ($messages['replaced'] as $msg) { + echo html::tag('li', null, html::span('propname', $msg['prop']) . + ' was replaced by ' . html::span('propname', $msg['replacement'])); + } + echo '</ul>'; + } + + if (is_array($messages['obsolete'])) { + echo '<h3>Obsolete config options</h3>'; + echo '<p class="hint">You still have some obsolete or inexistent properties set. This isn\'t a problem but should be noticed.</p>'; + + echo '<ul class="configwarings">'; + foreach ($messages['obsolete'] as $msg) { + echo html::tag('li', null, html::span('propname', $msg['prop']) . ($msg['name'] ? ': ' . $msg['name'] : '')); + } + echo '</ul>'; + } + + echo '<p class="suggestion">OK, lazy people can download the updated config files here: '; + echo html::a(array('href' => './?_mergeconfig=main'), 'main.inc.php') . ' '; + echo html::a(array('href' => './?_mergeconfig=db'), 'db.inc.php'); + echo "</p>"; +} + ?> <h3>Check if directories are writable</h3> |
