aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_zebra.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-06-08 20:26:03 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-06-08 20:26:03 +0000
commitef08df567522851202b09715c6b4bdef0c386403 (patch)
treef48e3798b2983a893c49943ac849be1d8a1ee5c7 /phpBB/includes/ucp/ucp_zebra.php
parent580a318d1624e76e258c5aa9a151e45f59bc7b91 (diff)
downloadforums-ef08df567522851202b09715c6b4bdef0c386403.tar
forums-ef08df567522851202b09715c6b4bdef0c386403.tar.gz
forums-ef08df567522851202b09715c6b4bdef0c386403.tar.bz2
forums-ef08df567522851202b09715c6b4bdef0c386403.tar.xz
forums-ef08df567522851202b09715c6b4bdef0c386403.zip
- bugfix roll
- fixed sql_query_limit on mssql/mssql_odbc git-svn-id: file:///svn/phpbb/trunk@6024 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 60d8822a00..9b2de97b8e 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -45,7 +45,7 @@ class ucp_zebra
if ($data['add'] && !sizeof($error))
{
- $data['add'] = explode("\n", $data['add']);
+ $data['add'] = array_map('strtolower', 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
@@ -62,16 +62,16 @@ class ucp_zebra
{
if ($row['friend'])
{
- $friends[] = $row['username'];
+ $friends[] = strtolower($row['username']);
}
else
{
- $foes[] = $row['username'];
+ $foes[] = strtolower($row['username']);
}
}
$db->sql_freeresult($result);
- $data['add'] = array_diff($data['add'], $friends, $foes, array($user->data['username']));
+ $data['add'] = array_diff($data['add'], $friends, $foes, array(strtolower($user->data['username'])));
unset($friends, $foes);
$data['add'] = implode(', ', preg_replace('#^[\s]*?(.*?)[\s]*?$#e', "\"'\" . \$db->sql_escape('\\1') . \"'\"", $data['add']));
@@ -80,7 +80,7 @@ class ucp_zebra
{
$sql = 'SELECT user_id, user_type
FROM ' . USERS_TABLE . '
- WHERE username IN (' . $data['add'] . ')
+ WHERE LOWER(username) IN (' . $data['add'] . ')
AND user_type NOT IN (' . USER_IGNORE . ', ' . USER_INACTIVE . ')';
$result = $db->sql_query($sql);