aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_zebra.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-10-13 22:10:18 +0000
committerNils Adermann <naderman@naderman.de>2006-10-13 22:10:18 +0000
commitc65048bd9132175e9ba780457fdf00438932c5fe (patch)
treef664b7b45b4fcd0bea7b1e41e03c03c683e03d6e /phpBB/includes/ucp/ucp_zebra.php
parent23d25ddcd169578b8fdf9ddbb35b5041ffbfd7ac (diff)
downloadforums-c65048bd9132175e9ba780457fdf00438932c5fe.tar
forums-c65048bd9132175e9ba780457fdf00438932c5fe.tar.gz
forums-c65048bd9132175e9ba780457fdf00438932c5fe.tar.bz2
forums-c65048bd9132175e9ba780457fdf00438932c5fe.tar.xz
forums-c65048bd9132175e9ba780457fdf00438932c5fe.zip
- introducing clean usernames, needs to be tested more, I'm not sure I didn't miss anything
- homograph list should probably be extended git-svn-id: file:///svn/phpbb/trunk@6494 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_zebra.php')
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index 7af77c7331..bf5c95d5a3 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -42,7 +42,7 @@ class ucp_zebra
if ($data['add'])
{
- $data['add'] = array_map('trim', array_map('utf8_strtolower', explode("\n", $data['add'])));
+ $data['add'] = array_map('trim', array_map('utf8_clean_string', explode("\n", $data['add'])));
// Do these name/s exist on a list already? If so, ignore ... we could be
// 'nice' and automatically handle names added to one list present on
@@ -59,11 +59,11 @@ class ucp_zebra
{
if ($row['friend'])
{
- $friends[] = utf8_strtolower($row['username']);
+ $friends[] = utf8_clean_string($row['username']);
}
else
{
- $foes[] = utf8_strtolower($row['username']);
+ $foes[] = utf8_clean_string($row['username']);
}
}
$db->sql_freeresult($result);
@@ -88,7 +88,7 @@ class ucp_zebra
// remove the user himself from the username array
$n = sizeof($data['add']);
- $data['add'] = array_diff($data['add'], array(utf8_strtolower($user->data['username'])));
+ $data['add'] = array_diff($data['add'], array(utf8_clean_string($user->data['username'])));
if (sizeof($data['add']) < $n)
{
@@ -101,7 +101,7 @@ class ucp_zebra
{
$sql = 'SELECT user_id, user_type
FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('LOWER(username)', $data['add']) . '
+ WHERE ' . $db->sql_in_set('username_clean', $data['add']) . '
AND user_type <> ' . USER_INACTIVE;
$result = $db->sql_query($sql);