diff options
| author | Graham Eames <grahamje@users.sourceforge.net> | 2006-09-16 14:04:20 +0000 |
|---|---|---|
| committer | Graham Eames <grahamje@users.sourceforge.net> | 2006-09-16 14:04:20 +0000 |
| commit | 26d4694071964ea48501b2126a679a3a9065bc0a (patch) | |
| tree | 669c4d0258b177143016a2c737070df17bdc277b /phpBB/install | |
| parent | b1aa00769367e4e2c241179612e66636e80b30a5 (diff) | |
| download | forums-26d4694071964ea48501b2126a679a3a9065bc0a.tar forums-26d4694071964ea48501b2126a679a3a9065bc0a.tar.gz forums-26d4694071964ea48501b2126a679a3a9065bc0a.tar.bz2 forums-26d4694071964ea48501b2126a679a3a9065bc0a.tar.xz forums-26d4694071964ea48501b2126a679a3a9065bc0a.zip | |
Extra check on table prefix for mysql
git-svn-id: file:///svn/phpbb/trunk@6374 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
| -rwxr-xr-x | phpBB/install/install_install.php | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index bea2296bfe..47f3ab5565 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1643,12 +1643,17 @@ class install_install extends module return false; } - // Check the prefix length to ensure that index names are not too long + // Check the prefix length to ensure that index names are not too long and does not contain invalid characters switch ($dbms) { case 'mysql': case 'mysql4': case 'mysqli': + if (stristr($table_prefix, '-') !== false) + { + $error[] = $lang['INST_ERR_PREFIX_INVALID']; + return false; + } case 'postgres': $prefix_length = 36; @@ -1783,26 +1788,6 @@ class install_install extends module } break; - case 'oracle': - $sql = "SELECT * - FROM NLS_DATABASE_PARAMETERS - WHERE PARAMETER = 'NLS_RDBMS_VERSION' - OR PARAMETER = 'NLS_CHARACTERSET';"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $stats[$row['parameter']] = $row['value']; - } - - $db->sql_freeresult($result); - - if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8') - { - $error[] = $lang['INST_ERR_DB_NO_ORACLE']; - } - break; - case 'postgres': $sql = "SHOW server_encoding;"; $result = $db->sql_query($sql); |
