1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 02:59:52 +02:00

- CAPTCHA: removed the extra slash

More backup stuff

- Made some things nicer for some of the DBs
- Made postgreSQL work on non empty databases
- Made SQLite ultra fast on restore

- Properly escaped (as far as I know) the profile data fields so that one may now use reserved words as column names


git-svn-id: file:///svn/phpbb/trunk@6144 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-07-04 03:54:41 +00:00
parent 5ccfc08d09
commit 6a1f1f5721
5 changed files with 113 additions and 47 deletions

View File

@@ -971,6 +971,34 @@ class acp_users
// Update Custom Fields
if (sizeof($cp_data))
{
switch (SQL_LAYER)
{
case 'oracle':
case 'firebird':
case 'postgres':
$right_delim = $left_delim = '"';
break;
case 'sqlite':
case 'mssql':
case 'mssql_odbc':
$right_delim = ']';
$left_delim = '[';
break;
case 'mysql':
case 'mysql4':
case 'mysqli':
$right_delim = $left_delim = '`';
break;
}
foreach ($cp_data as $key => $value)
{
$cp_data[$right_delim . $key . $left_delim] = $value;
unset($cp_data[$key]);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_DATA_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $cp_data) . "
WHERE user_id = $user_id";