From 8061b5b61408208c1fbe9da5d11f0abde2644ce8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 3 Feb 2007 11:59:16 +0000 Subject: [PATCH] #7618 git-svn-id: file:///svn/phpbb/trunk@6962 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/convertors/functions_phpbb20.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 14fde80478..fac58a7d7d 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -408,7 +408,7 @@ if (!$get_info) 'target' => DISALLOW_TABLE, 'query_first' => $convert->truncate_statement . DISALLOW_TABLE, - array('disallow_username', 'disallow.disallow_username', 'phpbb_set_encoding'), + array('disallow_username', 'disallow.disallow_username', 'phpbb_disallowed_username'), ), array( diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 05daae473b..271c1cf1e3 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1446,4 +1446,14 @@ function phpbb_inactive_reason() return INACTIVE_REGISTER; } +/** +* Adjust 2.0.x disallowed names to 3.0.x format +*/ +function phpbb_disallowed_username($username) +{ + // Replace * with % + $username = phpbb_set_default_encoding(str_replace('*', '%', $username)); + return utf8_htmlspecialchars($username); +} + ?> \ No newline at end of file