summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-09-22 09:31:11 +0200
committerAleksander Machniak <alec@alec.pl>2014-09-22 09:31:11 +0200
commitff767a14ff7675fce7b23b918f41fa92157dd0c0 (patch)
treef7a1ed9a6c7d5ec02e967278ff6301019258ead5 /installer
parent13bbcd0f59ef7a4459a6909079f0a558913e808a (diff)
parentabc00f27c5d923a02c946a634e158dfe9f20974e (diff)
Merge branch 'oracle'
Diffstat (limited to 'installer')
-rw-r--r--installer/test.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/installer/test.php b/installer/test.php
index 72c7a1f76..988451e9f 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -154,7 +154,7 @@ else if ($db_working && $_POST['updatedb']) {
// test database
if ($db_working) {
- $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_prefix']}users");
+ $db_read = $DB->query("SELECT count(*) FROM " . $DB->quote_identifier($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>';
@@ -178,17 +178,19 @@ if ($db_working) {
if ($db_working) {
// write test
$insert_id = md5(uniqid());
- $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);
+ $db_write = $DB->query("INSERT INTO " . $DB->quote_identifier($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_prefix']}session WHERE sess_id=?", $insert_id);
+ $DB->query("DELETE FROM " . $DB->quote_identifier($RCI->config['db_prefix'] . 'session')
+ . " WHERE `sess_id` = ?", $insert_id);
}
else {
$RCI->fail('DB Write', $RCI->get_error());
}
echo '<br />';
-
+
// check timezone settings
$tz_db = 'SELECT ' . $DB->unixtimestamp($DB->now()) . ' AS tz_db';
$tz_db = $DB->query($tz_db);