diff options
author | thomascube <thomas@roundcube.net> | 2008-10-14 12:40:11 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-10-14 12:40:11 +0000 |
commit | 871ca9adfedfa0aedf1994af579a5ea6715cff5f (patch) | |
tree | f422ca99db7d3987bba20f3e1a8f19a89c35d498 /installer/test.php | |
parent | 81308b30ed9c24a55fe87811a782f95fad0e4f3a (diff) |
Add dependency checks for config options + update database schema with MDB2_Schema (doesn't work correctly yet)
Diffstat (limited to 'installer/test.php')
-rw-r--r-- | installer/test.php | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/installer/test.php b/installer/test.php index edf77325a..d66fe34f2 100644 --- a/installer/test.php +++ b/installer/test.php @@ -69,6 +69,20 @@ if ($RCI->configured && ($messages = $RCI->check_config())) { echo html::a(array('href' => './?_mergeconfig=main'), 'main.inc.php') . ' '; echo html::a(array('href' => './?_mergeconfig=db'), 'db.inc.php'); echo "</p>"; + + + if (is_array($messages['dependencies'])) { + echo '<h3 class="warning">Dependency check failed</h3>'; + echo '<p class="hint">Some of your configuration settings require other options to be configured or additional PHP modules to be installed</p>'; + + echo '<ul class="configwarings">'; + foreach ($messages['dependencies'] as $msg) { + echo html::tag('li', null, html::span('propname', $msg['prop']) . ': ' . $msg['explain']); + } + echo '</ul>'; + } + + } ?> @@ -147,13 +161,22 @@ if ($db_working) { $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_table_users']}"); if (!$db_read) { $RCI->fail('DB Schema', "Database not initialized"); - $db_working = false; echo '<p><input type="submit" name="initdb" value="Initialize database" /></p>'; + $db_working = false; + } + /* + else if (!$RCI->db_schema_check($update = !empty($_POST['updatedb']))) { + $RCI->fail('DB Schema', "Database schema differs"); + + echo $update ? '<p class="warning">Failed to update the database schema! Please manually execute the SQL statements from the SQL/*.update.sql file on your database</p>' : + '<p><input type="submit" name="updatedb" value="Update schema now" /></p>'; + $db_working = false; } + */ else { $RCI->pass('DB Schema'); + echo '<br />'; } - echo '<br />'; } // more database tests @@ -169,7 +192,7 @@ if ($db_working) { else { $RCI->fail('DB Write', $RCI->get_error()); } - echo '<br />'; + echo '<br />'; // check timezone settings $tz_db = 'SELECT ' . $DB->unixtimestamp($DB->now()) . ' AS tz_db'; |