diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-04-27 18:31:40 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-04-27 18:31:40 +0200 |
commit | 399db1b647e14947e97a865c09215969f56a7efe (patch) | |
tree | 4801fc0482e3e6fe94fd6668dae03b13926b9d17 /installer/test.php | |
parent | d7fcd8ce422a24f794d18e2212163690bf3ca753 (diff) |
Add db_prefix configuration option in place of db_table_*/db_sequence_* options
Make possible to use db_prefix for schema initialization in Installer (#1489067)
Fix updatedb.sh script so it recognizes also table prefix for external DDL files
Diffstat (limited to 'installer/test.php')
-rw-r--r-- | installer/test.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/installer/test.php b/installer/test.php index 340fe267d..fb3e7e937 100644 --- a/installer/test.php +++ b/installer/test.php @@ -24,7 +24,7 @@ else if (!$read_main) { } echo '<br />'; -if ($read_db && !empty($RCI->config['db_table_users'])) { +if ($read_db && !empty($RCI->config['db_dsnw'])) { $RCI->pass('db.inc.php'); } else if ($read_db) { @@ -171,7 +171,7 @@ else if ($db_working && $_POST['updatedb']) { // test database if ($db_working) { - $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_table_users']}"); + $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_prefix']}users"); if ($DB->is_error()) { $RCI->fail('DB Schema', "Database not initialized"); echo '<p><input type="submit" name="initdb" value="Initialize database" /></p>'; @@ -195,11 +195,11 @@ if ($db_working) { if ($db_working) { // write test $insert_id = md5(uniqid()); - $db_write = $DB->query("INSERT INTO {$RCI->config['db_table_session']} (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id); + $db_write = $DB->query("INSERT INTO {$RCI->config['db_prefix']}session (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id); if ($db_write) { $RCI->pass('DB Write'); - $DB->query("DELETE FROM {$RCI->config['db_table_session']} WHERE sess_id=?", $insert_id); + $DB->query("DELETE FROM {$RCI->config['db_prefix']}session WHERE sess_id=?", $insert_id); } else { $RCI->fail('DB Write', $RCI->get_error()); |