diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 22:14:26 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 22:14:26 -0400 |
| commit | a052a791b553c770ef407f91b697bef7a62df5b1 (patch) | |
| tree | f49b8edf930f6d27fd14db4970107f128b02b992 /install.php | |
| parent | 232f4ff8680e81dbee3902c01af6c702555fbc0f (diff) | |
Add optional database table prefix (issue #118; see issue comments for details)
Diffstat (limited to 'install.php')
| -rw-r--r-- | install.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/install.php b/install.php index 847876ab..2f51b22f 100644 --- a/install.php +++ b/install.php @@ -501,6 +501,9 @@ if ($step == 0) { <label for="db_db">Database:</label> <input type="text" id="db_db" name="db[database]" value="" /> + <label for="db_pass">Table prefix (optional):</label> + <input type="password" id="db_pass" name="db[prefix]" value="" /> + <label for="db_user">Username:</label> <input type="text" id="db_user" name="db[user]" value="" /> @@ -668,7 +671,8 @@ if ($step == 0) { $queries[] = Element('posts.sql', array('board' => 'b')); $sql_errors = ''; - foreach ($queries as &$query) { + foreach ($queries as $query) { + $query = preg_replace('/^([\w\s]*)`([0-9a-zA-Z$_\x{0080}-\x{FFFF}]+)`/u', '$1``$2``', $query); if (!query($query)) $sql_errors .= '<li>' . db_error() . '</li>'; } |
