diff options
| author | David M <davidmj@users.sourceforge.net> | 2006-07-04 03:54:41 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2006-07-04 03:54:41 +0000 |
| commit | 6a1f1f57213c69219850785cbca3b67e782a2cca (patch) | |
| tree | 42b78d58547e7a377e89ef5431971b2c94bcf85f /phpBB/includes/functions_user.php | |
| parent | 5ccfc08d097b14f08c4276d12ac5b7e91e89490e (diff) | |
| download | forums-6a1f1f57213c69219850785cbca3b67e782a2cca.tar forums-6a1f1f57213c69219850785cbca3b67e782a2cca.tar.gz forums-6a1f1f57213c69219850785cbca3b67e782a2cca.tar.bz2 forums-6a1f1f57213c69219850785cbca3b67e782a2cca.tar.xz forums-6a1f1f57213c69219850785cbca3b67e782a2cca.zip | |
- 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
Diffstat (limited to 'phpBB/includes/functions_user.php')
| -rw-r--r-- | phpBB/includes/functions_user.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 3fb79ed5bb..4e943a2028 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -219,6 +219,34 @@ function user_add($user_row, $cp_data = false) { $cp_data['user_id'] = (int) $user_id; + 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]); + } + if (!class_exists('custom_profile')) { include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); |
