aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions_convert.php2
-rw-r--r--phpBB/includes/functions_user.php8
3 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 8257f8a48e..eb4eb77f22 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -173,7 +173,7 @@ define('FIELD_DATE', 6);
// Additional constants
-define('VOTE_CONVERTED', 9999);
+define('VOTE_CONVERTED', 127);
// Table names
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index ed35be3db7..477dd787a1 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1282,7 +1282,7 @@ function restore_config($schema)
// Most are...
if (is_string($config_value))
{
- $config_value = utf8_htmlspecialchars($config_value);
+ $config_value = truncate_string(utf8_htmlspecialchars($config_value), 255, false);
}
set_config($config_name, $config_value);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8782460ecf..55cf45505e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -143,7 +143,11 @@ function user_update_name($old_name, $new_name)
}
/**
-* Add User
+* Adds an user
+*
+* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
+* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
+* @return: the new user's ID.
*/
function user_add($user_row, $cp_data = false)
{
@@ -281,7 +285,7 @@ function user_add($user_row, $cp_data = false)
$sql = 'SELECT group_colour
FROM ' . GROUPS_TABLE . '
- WHERE group_id = ' . $user_row['group_id'];
+ WHERE group_id = ' . (int) $user_row['group_id'];
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);