aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_profile.php4
-rw-r--r--phpBB/includes/functions_profile_fields.php9
2 files changed, 12 insertions, 1 deletions
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