From 871ca9adfedfa0aedf1994af579a5ea6715cff5f Mon Sep 17 00:00:00 2001 From: thomascube Date: Tue, 14 Oct 2008 12:40:11 +0000 Subject: Add dependency checks for config options + update database schema with MDB2_Schema (doesn't work correctly yet) --- installer/test.php | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'installer/test.php') 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 "

"; + + + if (is_array($messages['dependencies'])) { + echo '

Dependency check failed

'; + echo '

Some of your configuration settings require other options to be configured or additional PHP modules to be installed

'; + + echo ''; + } + + } ?> @@ -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 '

'; + $db_working = false; + } + /* + else if (!$RCI->db_schema_check($update = !empty($_POST['updatedb']))) { + $RCI->fail('DB Schema', "Database schema differs"); + + echo $update ? '

Failed to update the database schema! Please manually execute the SQL statements from the SQL/*.update.sql file on your database

' : + '

'; + $db_working = false; } + */ else { $RCI->pass('DB Schema'); + echo '
'; } - echo '
'; } // more database tests @@ -169,7 +192,7 @@ if ($db_working) { else { $RCI->fail('DB Write', $RCI->get_error()); } - echo '
'; + echo '
'; // check timezone settings $tz_db = 'SELECT ' . $DB->unixtimestamp($DB->now()) . ' AS tz_db'; -- cgit v1.2.3