mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Extra check on table prefix for mysql
git-svn-id: file:///svn/phpbb/trunk@6374 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b1aa007693
commit
26d4694071
2 changed files with 8 additions and 22 deletions
|
@ -1643,12 +1643,17 @@ class install_install extends module
|
||||||
return false;
|
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)
|
switch ($dbms)
|
||||||
{
|
{
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
case 'mysql4':
|
case 'mysql4':
|
||||||
case 'mysqli':
|
case 'mysqli':
|
||||||
|
if (stristr($table_prefix, '-') !== false)
|
||||||
|
{
|
||||||
|
$error[] = $lang['INST_ERR_PREFIX_INVALID'];
|
||||||
|
return false;
|
||||||
|
}
|
||||||
case 'postgres':
|
case 'postgres':
|
||||||
$prefix_length = 36;
|
$prefix_length = 36;
|
||||||
|
|
||||||
|
@ -1783,26 +1788,6 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
break;
|
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':
|
case 'postgres':
|
||||||
$sql = "SHOW server_encoding;";
|
$sql = "SHOW server_encoding;";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
|
@ -61,7 +61,7 @@ $lang = array_merge($lang, array(
|
||||||
'CONTINUE_LAST' => 'Continue last statements',
|
'CONTINUE_LAST' => 'Continue last statements',
|
||||||
'CONVERT' => 'Convert',
|
'CONVERT' => 'Convert',
|
||||||
'CONVERT_COMPLETE' => 'Conversion completed',
|
'CONVERT_COMPLETE' => 'Conversion completed',
|
||||||
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and <a href="../">access your forum </a>. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Userguide</a> and the <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">Beta support forum</a>',
|
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and <a href="../">access your forum</a>. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Userguide</a> and the <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">Beta support forum</a>',
|
||||||
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
|
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
|
||||||
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.',
|
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.',
|
||||||
'CONVERT_NOT_EXIST' => 'The specified convertor does not exist',
|
'CONVERT_NOT_EXIST' => 'The specified convertor does not exist',
|
||||||
|
@ -173,6 +173,7 @@ $lang = array_merge($lang, array(
|
||||||
'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.',
|
'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.',
|
||||||
'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.',
|
'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.',
|
||||||
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
|
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
|
||||||
|
'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen',
|
||||||
'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.',
|
'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.',
|
||||||
'INST_ERR_USER_TOO_LONG' => 'The username you entered is too long. The maximum length is 20 characters.',
|
'INST_ERR_USER_TOO_LONG' => 'The username you entered is too long. The maximum length is 20 characters.',
|
||||||
'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.',
|
'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue