From b8076c575cded8c720529f13e75c4841d15dc6ba Mon Sep 17 00:00:00 2001 From: David M Date: Fri, 28 Jul 2006 03:45:32 +0000 Subject: [PATCH] - Bugs git-svn-id: file:///svn/phpbb/trunk@6213 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_profile.php | 4 ++++ phpBB/includes/functions_profile_fields.php | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index c30ed96591..cf952425e1 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -1043,6 +1043,10 @@ class acp_profile foreach($old_table_cols as $declaration) { $entities = preg_split('#\s+#', trim($declaration)); + if ($entities == 'PRIMARY') + { + continue; + } $column_list[] = $entities[0]; } diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 67344a3c40..61ffc7f46d 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -779,7 +779,14 @@ class custom_profile $sql_not_in = array(); foreach ($cp_data as $key => $null) { - $sql_not_in[] = "'" . $db->sql_escape($key) . "'"; + if (strncmp($key, '_', 1) === 0) + { + $sql_not_in[] = "'" . $db->sql_escape(substr($key, 1)) . "'"; + } + else + { + $sql_not_in[] = "'" . $db->sql_escape($key) . "'"; + } } $sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value